java.lang.Object
java.security.MessageDigestSpi
com.ibm.crypto.hdwrCCA.provider.SHA224
- All Implemented Interfaces:
Cloneable
This class implements the Secure Hash Algorithm 224 (SHA224) developed by
the National Institute of Standards and Technology along with the
National Security Agency.
-
Constructor Summary
ConstructorsConstructorDescriptionSHA224()Standard constructor, creates a new SHA224 instance, allocates its buffers from the heap. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones this object.protected byte[]Computes and returns the SHA hash.protected intengineDigest(byte[] buf, int offset, int len) Computes and returns the SHA hash in the buffer provided.protected intReturn the digest length in bytes.protected voidResets the SHA information back to starting values.protected voidengineUpdate(byte b) Update adds the passed byte to the digested data.protected voidengineUpdate(byte[] input, int offset, int len) Update adds the selected part of an array of bytes to the digest.voidinit()Initializes the SHA information.Methods inherited from class java.security.MessageDigestSpi
engineUpdate
-
Constructor Details
-
SHA224
public SHA224()Standard constructor, creates a new SHA224 instance, allocates its buffers from the heap.
-
-
Method Details
-
init
public void init()Initializes the SHA information. -
engineReset
protected void engineReset()Resets the SHA information back to starting values.- Specified by:
engineResetin classMessageDigestSpi
-
engineGetDigestLength
protected int engineGetDigestLength()Return the digest length in bytes.- Overrides:
engineGetDigestLengthin classMessageDigestSpi
-
engineUpdate
protected void engineUpdate(byte b) Update adds the passed byte to the digested data.- Specified by:
engineUpdatein classMessageDigestSpi- Parameters:
b- is the byte to update the digest with.
-
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:
engineUpdatein classMessageDigestSpi- Parameters:
input- array to be used to update digest.offset- the offset into the array.len- the length of the array.
-
engineDigest
protected byte[] engineDigest()Computes and returns the SHA hash.- Specified by:
engineDigestin classMessageDigestSpi- Returns:
- the SHA hash.
-
engineDigest
Computes and returns the SHA hash in the buffer provided.- Overrides:
engineDigestin 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.- Throws:
DigestException- is thrown when buf is not large enough to hold the resulting digest.
-
clone
Clones this object.- Overrides:
clonein classMessageDigestSpi
-