| java.lang.Object java.security.MessageDigestSpi sun.security.provider.SHA5
All known Subclasses: sun.security.provider.SHA3,
SHA5 | public class SHA5 extends MessageDigestSpi implements Cloneable(Code) | | This class implements the Secure Hash Algorithm SHA-512 developed by
the National Institute of Standards and Technology along with the
National Security Agency.
It implements java.security.MessageDigestSpi, and can be used
through Java Cryptography Architecture (JCA), as a pluggable
MessageDigest implementation.
version: 1.6 10/10/06 author: Valerie Peng |
Constructor Summary | |
| SHA5(SHA5 sha) | public | SHA5() Creates a new SHA object. |
Method Summary | |
public Object | clone() | protected byte[] | engineDigest() Computes the final hash and returns the final value as a
byte array. | protected int | engineDigest(byte[] hashvalue, int offset, int len) Computes the final hash and places the final value in the
specified array. | protected int | engineGetDigestLength() | protected void | engineReset() Resets the buffers and hash value to start a new hash. | protected void | engineUpdate(byte b) Update a byte. | protected void | engineUpdate(byte b, int off, int len) Update a buffer. | void | init() Resets the buffers and hash value to start a new hash. | void | performDigest(byte[] hashvalue, int offset, int resultLength) | void | setInitialHash(long[] values) |
SHA5 | SHA5(SHA5 sha)(Code) | | Creates a SHA5 object with state (for cloning)
|
SHA5 | public SHA5()(Code) | | Creates a new SHA object.
|
engineDigest | protected byte[] engineDigest()(Code) | | Computes the final hash and returns the final value as a
byte array. The object is reset to be ready for further
use, as specified in java.security.MessageDigest javadoc
specification.
|
engineDigest | protected int engineDigest(byte[] hashvalue, int offset, int len) throws DigestException(Code) | | Computes the final hash and places the final value in the
specified array. The object is reset to be ready for further
use, as specified in java.security.MessageDigest javadoc
specification.
Parameters: hashvalue - buffer to hold the digest Parameters: offset - offset for storing the digest Parameters: len - length of the buffer length of the digest in bytes |
engineGetDigestLength | protected int engineGetDigestLength()(Code) | | the length of the digest in bytes |
engineReset | protected void engineReset()(Code) | | Resets the buffers and hash value to start a new hash.
|
engineUpdate | protected void engineUpdate(byte b)(Code) | | Update a byte.
Parameters: b - the byte |
engineUpdate | protected void engineUpdate(byte b, int off, int len)(Code) | | Update a buffer.
Parameters: b - the data to be updated. Parameters: off - the start offset in the data Parameters: len - the number of bytes to be updated. |
init | void init()(Code) | | Resets the buffers and hash value to start a new hash.
|
performDigest | void performDigest(byte[] hashvalue, int offset, int resultLength) throws DigestException(Code) | | |
setInitialHash | void setInitialHash(long[] values)(Code) | | |
|
|