All Packages Class Hierarchy This Package Previous Next Index
Class utils.MD5
java.lang.Object
|
+----utils.MD5
- public final class MD5
- extends Object
Implementation of RSA's MD5 hash generator
This code is loosely based on the RSA reference implementation
and an early Java port of it by Santeri Paavolainen.
Objects of this class are single use only -- clients must
ensure that only one hash is computed, and sequentially too.
Hashes are returned as an array of 16 bytes.
Usage:
byte[] hash = MD5.hash(bytes); [single pass mode]
MD5 digest = new MD5(); [multiple pass mode]
digest.update(bytes);
digest.update(morebytes);
byte[] hash = digest.hash();
-
MD5()
-
-
hash()
-
-
hash(byte[])
-
-
hash(byte[], int, int)
-
-
main(String[])
- Runs RSA driver testsuite to check that the hash is correct
-
toString(byte[])
-
-
update(byte[])
-
-
update(byte[], int, int)
-
-
update(String)
-
MD5
public MD5()
update
public void update(byte buf[],
int offset,
int length)
update
public void update(byte buf[])
update
public void update(String s)
hash
public byte[] hash()
hash
public static byte[] hash(byte buf[],
int off,
int len)
hash
public static byte[] hash(byte buf[])
toString
public static String toString(byte hash[])
main
public static void main(String args[]) throws Exception
- Runs RSA driver testsuite to check that the hash is correct
All Packages Class Hierarchy This Package Previous Next Index