ch.ethz.ssh2.crypto.digest
Class MD5
java.lang.Object
ch.ethz.ssh2.crypto.digest.MD5
- All Implemented Interfaces:
- Digest
public final class MD5
- extends java.lang.Object
- implements Digest
MD5. Based on the example code in RFC 1321. Optimized (...a little).
- Version:
- $Id: MD5.java,v 1.2 2006/02/02 09:11:03 cplattne Exp $
- Author:
- Christian Plattner, plattner@inf.ethz.ch
Constructor Summary |
MD5()
|
Method Summary |
void |
digest(byte[] dst)
|
void |
digest(byte[] dst,
int pos)
|
private static void |
encode(byte[] dst,
int dstoff,
int word)
|
private static int |
FF(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
|
int |
getDigestLength()
|
private static int |
GG(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
|
private static int |
HH(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
|
private static int |
II(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
|
void |
reset()
|
private void |
transform(byte[] src,
int pos)
|
void |
update(byte b)
|
void |
update(byte[] b)
|
void |
update(byte[] buff,
int pos,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
state0
private int state0
state1
private int state1
state2
private int state2
state3
private int state3
count
private long count
block
private final byte[] block
x
private final int[] x
padding
private static final byte[] padding
MD5
public MD5()
FF
private static final int FF(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
GG
private static final int GG(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
HH
private static final int HH(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
II
private static final int II(int a,
int b,
int c,
int d,
int x,
int s,
int ac)
encode
private static final void encode(byte[] dst,
int dstoff,
int word)
transform
private final void transform(byte[] src,
int pos)
reset
public final void reset()
- Specified by:
reset
in interface Digest
update
public final void update(byte b)
- Specified by:
update
in interface Digest
update
public final void update(byte[] buff,
int pos,
int len)
- Specified by:
update
in interface Digest
update
public final void update(byte[] b)
- Specified by:
update
in interface Digest
digest
public final void digest(byte[] dst,
int pos)
- Specified by:
digest
in interface Digest
digest
public final void digest(byte[] dst)
- Specified by:
digest
in interface Digest
getDigestLength
public final int getDigestLength()
- Specified by:
getDigestLength
in interface Digest