Class java.crypt.MD5
All Packages Class Hierarchy This Package Previous Next Index
Class java.crypt.MD5
java.lang.Object
|
+----java.crypt.MessageDigest
|
+----java.crypt.MD5
- public final class MD5
- extends MessageDigest
This class implements the MD5 message digest.
The native code MD5 implementation used by the class was
developed by, and is owned by, RSA Data Security, Inc.
Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/)
All rights reserved.
-
HASH_LENGTH
- This is the length of the final hash (in bytes).
-
MD5()
- The public constructor.
-
addToDigest(byte[], int, int)
- Add data to the message digest (calls the native code).
-
digest()
- Returns the digest of the data added and resets the digest.
-
length()
- Return length of the hash (in bytes).
-
reset()
- Initialise (reset) the message digest.
HASH_LENGTH
public final static int HASH_LENGTH
- This is the length of the final hash (in bytes).
MD5
public MD5()
- The public constructor.
length
public int length()
- Return length of the hash (in bytes).
- Returns:
- The length of the hash.
- Overrides:
- length in class MessageDigest
- See Also:
- HASH_LENGTH
reset
public void reset()
- Initialise (reset) the message digest.
- Overrides:
- reset in class MessageDigest
digest
public byte[] digest()
- Returns the digest of the data added and resets the digest.
- Returns:
- the digest of all the data added to the message digest.
- Overrides:
- digest in class MessageDigest
addToDigest
protected void addToDigest(byte data[],
int offset,
int length)
- Add data to the message digest (calls the native code).
- Parameters:
- data - The data to be added.
- offset - The start of the data in the array.
- length - The amount of data to add.
- Overrides:
- addToDigest in class MessageDigest
All Packages Class Hierarchy This Package Previous Next Index