com.ibm.crypto.provider
Class MD5
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--com.ibm.crypto.provider.MD5
- public final class MD5
- extends MessageDigestSpi
- implements Cloneable
The MD5 class is used to compute an MD5 message digest over a given
buffer of bytes. It is an implementation of the RSA Data Security Inc.
MD5 algorithim as described in internet RFC 1321.
Constructor Summary |
MD5()
Standard constructor, creates a new MD5 instance, allocates its
buffers from the heap. |
Method Summary |
Object |
clone()
Clones this object. |
protected byte[] |
engineDigest()
|
protected int |
engineDigest(byte[] buf,
int offset,
int len)
|
protected int |
engineGetDigestLength()
Return the digest length in bytes |
protected void |
engineReset()
|
protected void |
engineUpdate(byte b)
Update adds the passed byte to the digested data. |
protected void |
engineUpdate(byte[] input,
int offset,
int len)
Update adds the selected part of an array of bytes to the digest. |
void |
init()
Initialize the MD5 information |
MD5
public MD5()
- Standard constructor, creates a new MD5 instance, allocates its
buffers from the heap.
init
public void init()
- Initialize the MD5 information
engineReset
protected void engineReset()
- Overrides:
- engineReset in class MessageDigestSpi
engineGetDigestLength
protected int engineGetDigestLength()
- Return the digest length in bytes
- Overrides:
- engineGetDigestLength in class MessageDigestSpi
engineUpdate
protected void engineUpdate(byte b)
- Update adds the passed byte to the digested data.
- Overrides:
- engineUpdate in class MessageDigestSpi
engineUpdate
protected void engineUpdate(byte[] input,
int offset,
int len)
- Update adds the selected part of an array of bytes to the digest.
This version is more efficient than the byte-at-a-time version;
it avoids data copies and reduces per-byte call overhead.
- Overrides:
- engineUpdate in class MessageDigestSpi
engineDigest
protected byte[] engineDigest()
- Overrides:
- engineDigest in class MessageDigestSpi
engineDigest
protected int engineDigest(byte[] buf,
int offset,
int len)
throws DigestException
- Overrides:
- engineDigest in class MessageDigestSpi
clone
public Object clone()
- Clones this object.
- Overrides:
- clone in class MessageDigestSpi