de.flexiprovider.core.md
Class SHA224_256
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--de.flexiprovider.api.MessageDigest
|
+--de.flexiprovider.core.md.SHA224_256
- Direct Known Subclasses:
- SHA224, SHA256
- public abstract class SHA224_256
- extends MessageDigest
Super class for SHA-224 and SHA-256
- Author:
- Ralf-P. Weinmann
|
Constructor Summary |
protected |
SHA224_256(int digestLength)
Constructor. |
|
Method Summary |
byte[] |
digest()
Complete the hash computation by performing final operations such as
padding. |
int |
getDigestLength()
|
protected void |
initMessageDigest(int[] initialState)
Initialize the function with an initial state. |
void |
update(byte input)
Update the digest using the specified input byte. |
void |
update(byte[] input,
int inOff,
int inLen)
Update the digest using the specified input byte array. |
| Methods inherited from class java.security.MessageDigestSpi |
clone, engineDigest |
| Methods inherited from class java.lang.Object |
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHA224_256
protected SHA224_256(int digestLength)
- Constructor.
- Parameters:
digestLength - the digest length
initMessageDigest
protected void initMessageDigest(int[] initialState)
- Initialize the function with an initial state.
- Parameters:
initialState - the initial state
getDigestLength
public int getDigestLength()
- Overrides:
getDigestLength in class MessageDigest
- Returns:
- the digest length in bytes
update
public void update(byte input)
- Update the digest using the specified input byte.
- Overrides:
update in class MessageDigest
- Parameters:
input - the input byte
update
public void update(byte[] input,
int inOff,
int inLen)
- Update the digest using the specified input byte array.
- Overrides:
update in class MessageDigest
- Parameters:
input - the inputinOff - the offset where the input startsinLen - the input length
digest
public byte[] digest()
- Complete the hash computation by performing final operations such as
padding.
- Overrides:
digest in class MessageDigest
- Returns:
- the digest value