com.ibm.crypto.provider
Class SHA5

java.lang.Object
  extended byjava.security.MessageDigestSpi
      extended bycom.ibm.crypto.provider.SHA5
All Implemented Interfaces:
Cloneable

public final class SHA5
extends MessageDigestSpi
implements Cloneable

This class implements the Secure Hash Algorithm 5 (SHA-5) developed by the National Institute of Standards and Technology along with the National Security Agency.


Constructor Summary
SHA5()
          Standard constructor, creates a new SHA5 instance, allocates its buffers from the heap.
 
Method Summary
 Object clone()
          Clones this object.
protected  byte[] engineDigest()
          Compute the final hash and reset the engine so that it is ready for re-use, as specifed by MessageDigest.
protected  int engineDigest(byte[] buf, int offset, int len)
          Compute the final hash and reset the engine so that it is ready for re-use, as specifed by MessageDigest.
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 SHA5 information
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHA5

public SHA5()
Standard constructor, creates a new SHA5 instance, allocates its buffers from the heap.

Method Detail

init

public void init()
Initialize the SHA5 information


engineReset

protected void engineReset()

engineGetDigestLength

protected int engineGetDigestLength()
Return the digest length in bytes


engineUpdate

protected void engineUpdate(byte b)
Update adds the passed byte to the digested data.


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.


engineDigest

protected byte[] engineDigest()
Compute the final hash and reset the engine so that it is ready for re-use, as specifed by MessageDigest.


engineDigest

protected int engineDigest(byte[] buf,
                           int offset,
                           int len)
                    throws DigestException
Compute the final hash and reset the engine so that it is ready for re-use, as specifed by MessageDigest.

Throws:
DigestException

clone

public Object clone()
Clones this object.