net.sourceforge.jtds.util

Class MD4Digest


public class MD4Digest
extends GeneralDigest

implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for Computer Science and RSA Data Security, Inc.

NOTE: This algorithm is only included for backwards compatability with legacy applications, it's not secure, don't use it for anything new!

Version:
$Id: MD4Digest.java,v 1.2 2004/06/27 17:00:55 bheineman Exp $

Field Summary

private static int
DIGEST_LENGTH
private int
H1
private int
H2
private int
H3
private int
H4
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[]
X
private int
xOff

Fields inherited from class net.sourceforge.jtds.util.GeneralDigest

byteCount, xBuf, xBufOff

Constructor Summary

MD4Digest()
Standard constructor
MD4Digest(MD4Digest t)
Copy constructor.

Method Summary

private int
F(int u, int v, int w)
private int
G(int u, int v, int w)
private int
H(int u, int v, int w)
int
doFinal(byte[] out, int outOff)
String
getAlgorithmName()
int
getDigestSize()
protected void
processBlock()
protected void
processLength(long bitLength)
protected void
processWord(byte[] in, int inOff)
void
reset()
reset the chaining variables to the IV values.
private int
rotateLeft(int x, int n)
private void
unpackWord(int word, byte[] out, int outOff)

Methods inherited from class net.sourceforge.jtds.util.GeneralDigest

finish, processBlock, processLength, processWord, reset, update, update

Field Details

DIGEST_LENGTH

private static final int DIGEST_LENGTH
Field Value:
16

H1

private int H1

H2

private int H2

H3

private int H3

H4

private int H4

S11

private static final int S11
Field Value:
3

S12

private static final int S12
Field Value:
7

S13

private static final int S13
Field Value:
11

S14

private static final int S14
Field Value:
19

S21

private static final int S21
Field Value:
3

S22

private static final int S22
Field Value:
5

S23

private static final int S23
Field Value:
9

S24

private static final int S24
Field Value:
13

S31

private static final int S31
Field Value:
3

S32

private static final int S32
Field Value:
9

S33

private static final int S33
Field Value:
11

S34

private static final int S34
Field Value:
15

X

private int[] X

xOff

private int xOff

Constructor Details

MD4Digest

public MD4Digest()
Standard constructor

MD4Digest

public MD4Digest(MD4Digest t)
Copy constructor. This will copy the state of the provided message digest.

Method Details

F

private int F(int u,
              int v,
              int w)

G

private int G(int u,
              int v,
              int w)

H

private int H(int u,
              int v,
              int w)

doFinal

public int doFinal(byte[] out,
                   int outOff)

getAlgorithmName

public String getAlgorithmName()

getDigestSize

public int getDigestSize()

processBlock

protected void processBlock()
Overrides:
processBlock in interface GeneralDigest

processLength

protected void processLength(long bitLength)
Overrides:
processLength in interface GeneralDigest

processWord

protected void processWord(byte[] in,
                           int inOff)
Overrides:
processWord in interface GeneralDigest

reset

public void reset()
reset the chaining variables to the IV values.
Overrides:
reset in interface GeneralDigest

rotateLeft

private int rotateLeft(int x,
                       int n)

unpackWord

private void unpackWord(int word,
                        byte[] out,
                        int outOff)

Generated on June 12 2008