Top Description Fields Constructors Methods
com.sun.mail.auth

public final Class MD4

extends Object
Class Inheritance
Imports
java.security.*

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.
Authors
Andreas Sterbenz, Bill Shannon (adapted for JavaMail)

Field Summary

Modifier and TypeField and Description
private static final int
private final byte[]
private int
private long
private static final byte[]
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final int[]
private final int[]
x

Constructor Summary

AccessConstructor and Description
public
MD4()

Standard constructor, creates a new MD4 instance.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the message digest byte array
digest
(byte[]
the input byte array
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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blockSizeback to summary
private static final int blockSize
bufferback to summary
private final byte[] buffer
bufOfsback to summary
private int bufOfs
bytesProcessedback to summary
private long bytesProcessed
paddingback to summary
private static final byte[] padding
S11back to summary
private static final int S11
S12back to summary
private static final int S12
S13back to summary
private static final int S13
S14back to summary
private static final int S14
S21back to summary
private static final int S21
S22back to summary
private static final int S22
S23back to summary
private static final int S23
S24back to summary
private static final int S24
S31back to summary
private static final int S31
S32back to summary
private static final int S32
S33back to summary
private static final int S33
S34back to summary
private static final int S34
stateback to summary
private final int[] state
xback to summary
private final int[] x

Constructor Detail

MD4back to summary
public MD4()

Standard constructor, creates a new MD4 instance.

Method Detail

digestback to summary
public byte[] digest(byte[] in)

Compute and return the message digest of the input byte array.

Parameters
in:byte[]

the input byte array

Returns:byte[]

the message digest byte array

engineUpdateback to summary
private void engineUpdate(byte[] b, int ofs, int len)
FFback to summary
private static int FF(int a, int b, int c, int d, int x, int s)
GGback to summary
private static int GG(int a, int b, int c, int d, int x, int s)
HHback to summary
private static int HH(int a, int b, int c, int d, int x, int s)
implCompressback to summary
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.

implDigestback to summary
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.

implResetback to summary
private void implReset()

Reset the state of this object.