| java.lang.Object java.security.MessageDigestSpi sun.security.provider.SHA
SHA | public class SHA extends MessageDigestSpi implements Cloneable(Code) | | This class implements the Secure Hash Algorithm (SHA) developed by
the National Institute of Standards and Technology along with the
National Security Agency. This is the updated version of SHA
fip-180 as superseded by fip-180-1.
It implement JavaSecurity MessageDigest, and can be used by in
the Java Security framework, as a pluggable implementation, as a
filter for the digest stream classes.
version: 1.35 02/02/00 author: Roger Riggs author: Benjamin Renaud |
Constructor Summary | |
| SHA(int version) | public | SHA() Creates a new SHA object. |
Method Summary | |
public Object | clone() | public byte[] | engineDigest() Computes the final hash and returns the final value as a
byte[20] array. | public int | engineDigest(byte[] hashvalue, int offset, int len) Computes the final hash and returns the final value as a
byte[20] array. | protected int | engineGetDigestLength() | public void | engineReset() Resets the buffers and hash value to start a new hash. | public void | engineUpdate(byte b) | public void | engineUpdate(byte b, int off, int len) Update a buffer. | public void | init() Resets the buffers and hash value to start a new hash. |
SHA | public SHA()(Code) | | Creates a new SHA object.
|
engineDigest | public byte[] engineDigest()(Code) | | Computes the final hash and returns the final value as a
byte[20] array. The object is reset to be ready for further
use, as specified in the JavaSecurity MessageDigest
specification.
|
engineDigest | public int engineDigest(byte[] hashvalue, int offset, int len) throws DigestException(Code) | | Computes the final hash and returns the final value as a
byte[20] array. The object is reset to be ready for further
use, as specified in the JavaSecurity MessageDigest
specification.
|
engineGetDigestLength | protected int engineGetDigestLength()(Code) | | Return the length of the digest in bytes
|
engineReset | public void engineReset()(Code) | | Resets the buffers and hash value to start a new hash.
|
engineUpdate | public void engineUpdate(byte b)(Code) | | |
engineUpdate | public 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 | public void init()(Code) | | Resets the buffers and hash value to start a new hash.
|
|
|