au.net.aba.crypto.provider
Class SHA1
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--java.security.MessageDigest
|
+--au.net.aba.crypto.provider.SHA1
- public class SHA1
- extends java.security.MessageDigest
A class that implements the NIST Secure Hash Algorithm - version 1.
Constructor Summary |
SHA1()
basic constructor |
Method Summary |
protected byte[] |
engineDigest()
compute the digest and reset the engine. |
protected void |
engineReset()
reset the digest back to its original state. |
protected void |
engineUpdate(byte b)
update the digest with a single byte |
protected void |
engineUpdate(byte[] bytes,
int offset,
int length)
add a block of data from the array bytes, to the message
digest. |
Methods inherited from class java.security.MessageDigest |
clone,
digest,
digest,
digest,
getAlgorithm,
getDigestLength,
getInstance,
getInstance,
getProvider,
isEqual,
reset,
toString,
update,
update,
update |
Methods inherited from class java.security.MessageDigestSpi |
engineDigest,
engineGetDigestLength |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ident
public static final java.lang.String ident
DIGEST_LEN
public static final int DIGEST_LEN
SHA1
public SHA1()
- basic constructor
engineReset
protected void engineReset()
- reset the digest back to its original state.
- Overrides:
- engineReset in class java.security.MessageDigestSpi
engineUpdate
protected void engineUpdate(byte b)
- update the digest with a single byte
- Parameters:
b
- the byte to be added.- Overrides:
- engineUpdate in class java.security.MessageDigestSpi
engineUpdate
protected void engineUpdate(byte[] bytes,
int offset,
int length)
- add a block of data from the array bytes, to the message
digest. The block starts offset bytes into the array and is
of size length.
- Parameters:
bytes
- the byte array.offset
- offset into the array to start from.length
- size of the block.- Overrides:
- engineUpdate in class java.security.MessageDigestSpi
engineDigest
protected byte[] engineDigest()
- compute the digest and reset the engine.
- Returns:
- the message digest as a byte array.
- Overrides:
- engineDigest in class java.security.MessageDigestSpi