Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.md
Class RIPEMD  view RIPEMD download RIPEMD.java

java.lang.Object
  extended byjava.security.MessageDigestSpi
      extended bycryptix.jce.provider.md.PaddingMD
          extended bycryptix.jce.provider.md.RIPEMD

public final class RIPEMD
extends PaddingMD

RIPEMD message digest algorithm as described in ISO/IEC 10118-3:1998 Information technology - Security techniques - Hash-functions - Part 3: Dedicated hash-functions. RIPEMD basically is a slightly modified version of MD4 with a set of parallel rounds added. It is not much more secure than MD4 and its use is not recommended for anything but compatibility with legacy applications. http://www.iso.ch/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=25428 http://link.springer.de/link/service/journals/00145/bibs/10n1p51.html http://www.ietf.org/rfc/rfc1320.txt

Version:
$Revision: 1.2 $

Field Summary
private  int[] context
          4 32-bit words (interim result)
private static int HASH_SIZE
          Size (in bytes) of this hash
(package private) static int MODE_MD
           
(package private) static int MODE_SHA
           
(package private) static int MODE_TIGER
           
private  int[] savedContext
          4 32-bit words (saved results)
private  int[] X
          512 bits work buffer = 16 x 32-bit words
 
Constructor Summary
  RIPEMD()
           
private RIPEMD(RIPEMD src)
           
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this class.
protected  void coreDigest(byte[] buf, int off)
          Return the hash bytes in buf, starting at offset off.
protected  void coreReset()
          Reset the hash internal structures to initial state.
protected  void coreUpdate(byte[] block, int offset)
          Update the internal state with a single block.
protected  byte[] engineDigest()
          Computes the final digest of the stored bytes and returns them.
protected  int engineDigest(byte[] buf, int offset, int len)
          Computes the final digest of the stored bytes and returns them.
protected  int engineGetDigestLength()
          Returns the length of the digest.
protected  void engineReset()
          Resets the digest engine.
protected  void engineUpdate(byte input)
          Updates the digest with the specified byte.
protected  void engineUpdate(byte[] input, int offset, int length)
          Updates the digest with the specified bytes starting with the offset and proceeding for the specified length.
private  int FF(int a, int b, int c, int d, int x, int s)
           
private  int FFP(int a, int b, int c, int d, int x, int s)
           
private  int GG(int a, int b, int c, int d, int x, int s)
           
private  int GGP(int a, int b, int c, int d, int x, int s)
           
private  int HH(int a, int b, int c, int d, int x, int s)
           
private  int HHP(int a, int b, int c, int d, int x, int s)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HASH_SIZE

private static final int HASH_SIZE
Size (in bytes) of this hash

See Also:
Constant Field Values

context

private int[] context
4 32-bit words (interim result)


savedContext

private int[] savedContext
4 32-bit words (saved results)


X

private int[] X
512 bits work buffer = 16 x 32-bit words


MODE_MD

static final int MODE_MD
See Also:
Constant Field Values

MODE_SHA

static final int MODE_SHA
See Also:
Constant Field Values

MODE_TIGER

static final int MODE_TIGER
See Also:
Constant Field Values
Constructor Detail

RIPEMD

public RIPEMD()

RIPEMD

private RIPEMD(RIPEMD src)
Method Detail

clone

public java.lang.Object clone()
Description copied from class: java.security.MessageDigestSpi
Returns a clone of this class. If cloning is not supported, then by default the class throws a CloneNotSupportedException. The MessageDigestSpi provider implementation has to overload this class in order to be cloneable.

Overrides:
clone in class PaddingMD

coreDigest

protected void coreDigest(byte[] buf,
                          int off)
Description copied from class: PaddingMD
Return the hash bytes in buf, starting at offset off. The subclass is expected to write exactly hashSize bytes in the given buffer. The buffer is guaranteed to be large enough.

Specified by:
coreDigest in class PaddingMD

coreReset

protected void coreReset()
Description copied from class: PaddingMD
Reset the hash internal structures to initial state.

Specified by:
coreReset in class PaddingMD

coreUpdate

protected void coreUpdate(byte[] block,
                          int offset)
Description copied from class: PaddingMD
Update the internal state with a single block. buf contains a single block (64 bytes, 512 bits) of data, starting at offset off.

Specified by:
coreUpdate in class PaddingMD

FF

private int FF(int a,
               int b,
               int c,
               int d,
               int x,
               int s)

GG

private int GG(int a,
               int b,
               int c,
               int d,
               int x,
               int s)

HH

private int HH(int a,
               int b,
               int c,
               int d,
               int x,
               int s)

FFP

private int FFP(int a,
                int b,
                int c,
                int d,
                int x,
                int s)

GGP

private int GGP(int a,
                int b,
                int c,
                int d,
                int x,
                int s)

HHP

private int HHP(int a,
                int b,
                int c,
                int d,
                int x,
                int s)

engineGetDigestLength

protected int engineGetDigestLength()
Description copied from class: java.security.MessageDigestSpi
Returns the length of the digest. It may be overridden by the provider to return the length of the digest. Default is to return 0. It is concrete for backwards compatibility with JDK1.1 message digest classes.


engineUpdate

protected void engineUpdate(byte input)
Description copied from class: java.security.MessageDigestSpi
Updates the digest with the specified byte.


engineUpdate

protected void engineUpdate(byte[] input,
                            int offset,
                            int length)
Description copied from class: java.security.MessageDigestSpi
Updates the digest with the specified bytes starting with the offset and proceeding for the specified length.


engineDigest

protected byte[] engineDigest()
Description copied from class: java.security.MessageDigestSpi
Computes the final digest of the stored bytes and returns them. It performs any necessary padding. The message digest should reset sensitive data after performing the digest.


engineDigest

protected int engineDigest(byte[] buf,
                           int offset,
                           int len)
                    throws java.security.DigestException
Description copied from class: java.security.MessageDigestSpi
Computes the final digest of the stored bytes and returns them. It performs any necessary padding. The message digest should reset sensitive data after performing the digest. This method is left concrete for backwards compatibility with JDK1.1 message digest classes.


engineReset

protected void engineReset()
Description copied from class: java.security.MessageDigestSpi
Resets the digest engine. Reinitializes internal variables and clears sensitive data.