|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.security.MessageDigestSpi | +--org.metastatic.rsync.MD4
An implementation of Ron Rivest's MD4 message digest algorithm. MD4 was the precursor to the stronger MD5 algorithm, and while not considered cryptograpically secure itself, MD4 is in use in various applications. It is slightly faster than MD5.
This implementation is derived from the version of MD4 in GNU Crypto.
References:
Field Summary | |
---|---|
protected int |
a
|
protected static int |
A
|
protected int |
b
|
protected static int |
B
|
static int |
BLOCK_LENGTH
The MD4 algorithm operates on 512-bit blocks, or 64 bytes. |
protected byte[] |
buffer
|
protected int |
c
|
protected static int |
C
|
protected long |
count
|
protected int |
d
|
protected static int |
D
|
static int |
DIGEST_LENGTH
An MD4 message digest is always 128-bits long, or 16 bytes. |
Constructor Summary | |
---|---|
MD4()
Trivial zero-argument constructor. |
Method Summary | |
---|---|
Object |
clone()
|
protected byte[] |
engineDigest()
Pack the four chaining variables into a byte array. |
protected int |
engineDigest(byte[] out,
int off,
int len)
|
protected int |
engineGetDigestLength()
|
protected void |
engineReset()
Reset the four chaining variables. |
void |
engineUpdate(byte b)
|
protected void |
engineUpdate(byte[] b,
int offset,
int len)
|
protected byte[] |
padBuffer()
Pad the buffer by appending the byte 0x80, then as many zero bytes to fill the buffer 8 bytes shy of being a multiple of 64 bytes, then append the length of the buffer, in bits, before padding. |
protected void |
transform(byte[] in,
int offset)
Transform a 64-byte block. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DIGEST_LENGTH
public static final int BLOCK_LENGTH
protected static final int A
protected static final int B
protected static final int C
protected static final int D
protected int a
protected int b
protected int c
protected int d
protected long count
protected final byte[] buffer
Constructor Detail |
public MD4()
Method Detail |
public Object clone()
clone
in class MessageDigestSpi
protected int engineGetDigestLength()
engineGetDigestLength
in class MessageDigestSpi
public void engineUpdate(byte b)
engineUpdate
in class MessageDigestSpi
protected void engineUpdate(byte[] b, int offset, int len)
engineUpdate
in class MessageDigestSpi
protected byte[] engineDigest()
engineDigest
in class MessageDigestSpi
protected int engineDigest(byte[] out, int off, int len) throws DigestException
engineDigest
in class MessageDigestSpi
DigestException
protected void engineReset()
engineReset
in class MessageDigestSpi
protected byte[] padBuffer()
protected void transform(byte[] in, int offset)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |