java.lang.Object
java.security.MessageDigestSpi
com.ibm.crypto.ibmjcehybrid.provider.MD2DigestHybrid
- All Implemented Interfaces:
Cloneable
This class is a facade for signatures using the MD2 algorithm.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this object.protected byte[]
Computes and returns the MD5 hash.protected int
engineDigest
(byte[] buf, int offset, int len) Computes and returns the MD5 hash in the buffer provided.protected int
Return the digest length in bytes.protected void
Resets the MD5 information back to starting values.protected void
engineUpdate
(byte b) Update adds the passed byte to the digested data.protected void
engineUpdate
(byte[] input) Update adds the passed byte array 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.Methods inherited from class java.security.MessageDigestSpi
engineUpdate
-
Constructor Details
-
MD2DigestHybrid
public MD2DigestHybrid()Creates a new instance of the MD2DigestHybrid class.
-
-
Method Details
-
clone
Clones this object.- Overrides:
clone
in classMessageDigestSpi
- Throws:
CloneNotSupportedException
-
engineReset
protected void engineReset()Resets the MD5 information back to starting values.- Specified by:
engineReset
in classMessageDigestSpi
-
engineGetDigestLength
protected int engineGetDigestLength()Return the digest length in bytes.- Overrides:
engineGetDigestLength
in classMessageDigestSpi
-
engineUpdate
protected void engineUpdate(byte b) Update adds the passed byte to the digested data.- Specified by:
engineUpdate
in classMessageDigestSpi
- Parameters:
b
- is the byte to add to the digest.
-
engineUpdate
protected void engineUpdate(byte[] input) Update adds the passed byte array to the digested data.- Parameters:
input
- is the byte array to add to the digest.
-
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.- Specified by:
engineUpdate
in classMessageDigestSpi
- Parameters:
input
- array used to update the digest.offset
- the offset into the array.len
- the length of the array.
-
engineDigest
protected byte[] engineDigest()Computes and returns the MD5 hash.- Specified by:
engineDigest
in classMessageDigestSpi
- Returns:
- the hash.
-
engineDigest
Computes and returns the MD5 hash in the buffer provided.- Overrides:
engineDigest
in classMessageDigestSpi
- Parameters:
buf
- the buffer to put the MD5 hash into.offset
- is the offset in the buffer into which to copy the hash.len
- the length of the buffer.- Returns:
- the length of the hash.
- Throws:
DigestException
- is thrown when the array is not large enough to hold the digest.
-