de.flexiprovider.pqc.hbc.ots
Class MessageDigestWrapper
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--de.flexiprovider.api.MessageDigest
|
+--de.flexiprovider.pqc.hbc.ots.MessageDigestWrapper
- public class MessageDigestWrapper
- extends MessageDigest
Wraps the given message digest to realize a given output length
- Author:
- Sarah
|
Method Summary |
byte[] |
digest()
returns the message digest output cut to the desired byte-length |
int |
getDigestLength()
|
int |
getLength()
|
void |
reset()
Reset the digest for further use. |
void |
setLength(int length)
|
void |
update(byte input)
Update the digest using the specified byte. |
void |
update(byte[] input,
int offset,
int len)
Update the digest using the specified array of bytes, starting at the
specified offset. |
| 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 |
MessageDigestWrapper
public MessageDigestWrapper(MessageDigest md,
int length)
setLength
public void setLength(int length)
getLength
public int getLength()
digest
public byte[] digest()
- returns the message digest output cut to the desired byte-length
- Overrides:
digest in class MessageDigest
- Following copied from class:
de.flexiprovider.api.MessageDigest
- Returns:
- the array of bytes for the resulting hash value.
getDigestLength
public int getDigestLength()
- Overrides:
getDigestLength in class MessageDigest
- Following copied from class:
de.flexiprovider.api.MessageDigest
- Returns:
- the digest length in bytes
reset
public void reset()
- Description copied from class:
MessageDigest
- Reset the digest for further use.
- Overrides:
reset in class MessageDigest
update
public void update(byte input)
- Description copied from class:
MessageDigest
- Update the digest using the specified byte.
- Overrides:
update in class MessageDigest
- Following copied from class:
de.flexiprovider.api.MessageDigest
- Parameters:
input - the byte to use for the update
update
public void update(byte[] input,
int offset,
int len)
- Description copied from class:
MessageDigest
- Update the digest using the specified array of bytes, starting at the
specified offset.
- Overrides:
update in class MessageDigest
- Following copied from class:
de.flexiprovider.api.MessageDigest
- Parameters:
input - the array of bytes to use for the updateoffset - the offset to start from in the array of byteslen - the number of bytes to use, starting at offset