Package com.sun.mail.auth
Class MD4
- java.lang.Object
-
- com.sun.mail.auth.MD4
-
public final class MD4 extends java.lang.Object
The MD4 class is used to compute an MD4 message digest over a given buffer of bytes. It is an implementation of the RSA Data Security Inc MD4 algorithim as described in internet RFC 1320.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
blockSize
private byte[]
buffer
private int
bufOfs
private long
bytesProcessed
private static byte[]
padding
private static int
S11
private static int
S12
private static int
S13
private static int
S14
private static int
S21
private static int
S22
private static int
S23
private static int
S24
private static int
S31
private static int
S32
private static int
S33
private static int
S34
private int[]
state
private int[]
x
-
Constructor Summary
Constructors Constructor Description MD4()
Standard constructor, creates a new MD4 instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
digest(byte[] in)
Compute and return the message digest of the input byte array.private void
engineUpdate(byte[] b, int ofs, int len)
private static int
FF(int a, int b, int c, int d, int x, int s)
private static int
GG(int a, int b, int c, int d, int x, int s)
private static int
HH(int a, int b, int c, int d, int x, int s)
private void
implCompress(byte[] buf, int ofs)
This is where the functions come together as the generic MD4 transformation operation.private void
implDigest(byte[] out, int ofs)
Perform the final computations, any buffered bytes are added to the digest, the count is added to the digest, and the resulting digest is stored.private void
implReset()
Reset the state of this object.
-
-
-
Field Detail
-
state
private final int[] state
-
x
private final int[] x
-
blockSize
private static final int blockSize
- See Also:
- Constant Field Values
-
buffer
private final byte[] buffer
-
bufOfs
private int bufOfs
-
bytesProcessed
private long bytesProcessed
-
S11
private static final int S11
- See Also:
- Constant Field Values
-
S12
private static final int S12
- See Also:
- Constant Field Values
-
S13
private static final int S13
- See Also:
- Constant Field Values
-
S14
private static final int S14
- See Also:
- Constant Field Values
-
S21
private static final int S21
- See Also:
- Constant Field Values
-
S22
private static final int S22
- See Also:
- Constant Field Values
-
S23
private static final int S23
- See Also:
- Constant Field Values
-
S24
private static final int S24
- See Also:
- Constant Field Values
-
S31
private static final int S31
- See Also:
- Constant Field Values
-
S32
private static final int S32
- See Also:
- Constant Field Values
-
S33
private static final int S33
- See Also:
- Constant Field Values
-
S34
private static final int S34
- See Also:
- Constant Field Values
-
padding
private static final byte[] padding
-
-
Method Detail
-
digest
public byte[] digest(byte[] in)
Compute and return the message digest of the input byte array.- Parameters:
in
- the input byte array- Returns:
- the message digest byte array
-
implReset
private void implReset()
Reset the state of this object.
-
implDigest
private void implDigest(byte[] out, int ofs)
Perform the final computations, any buffered bytes are added to the digest, the count is added to the digest, and the resulting digest is stored.
-
engineUpdate
private void engineUpdate(byte[] b, int ofs, int len)
-
FF
private static int FF(int a, int b, int c, int d, int x, int s)
-
GG
private static int GG(int a, int b, int c, int d, int x, int s)
-
HH
private static int HH(int a, int b, int c, int d, int x, int s)
-
implCompress
private void implCompress(byte[] buf, int ofs)
This is where the functions come together as the generic MD4 transformation operation. It consumes 64 bytes from the buffer, beginning at the specified offset.
-
-