de.flexiprovider.core.md.swifftx
Class SWIFFTX512
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--de.flexiprovider.api.MessageDigest
|
+--de.flexiprovider.core.md.swifftx.SWIFFTX512
- public class SWIFFTX512
- extends MessageDigest
This class implements the SWIFFTX512 hash function. It is designed by Yuriy
Arbitman, Gil Dogon, Vadim Lyubashevsky, Daniele Micciancio, Chris Peikert,
and Alon Rosen. It is a candidate for the SHA-3 competition. The
specification of the algorithm can be found at . The
implementation is a direct translation from the reference C implementation.
- Author:
- Stephan Mönkehues
|
Field Summary |
static java.lang.String |
ALG_NAME
The algorithm name. |
|
Constructor Summary |
SWIFFTX512()
Default constructor. |
|
Method Summary |
byte[] |
digest()
Hashes the input. |
int |
getDigestLength()
Returns the number of bytes of the output of the SWIFFTX224 hash
function. |
void |
reset()
Resets this hash function for clearing any internal stages. |
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 |
ALG_NAME
public static final java.lang.String ALG_NAME
- The algorithm name.
SWIFFTX512
public SWIFFTX512()
- Default constructor.
digest
public byte[] digest()
- Hashes the input.
- Overrides:
digest in class MessageDigest
- Returns:
- the digested data
reset
public void reset()
- Resets this hash function for clearing any internal stages.
- Overrides:
reset in class MessageDigest
getDigestLength
public int getDigestLength()
- Returns the number of bytes of the output of the SWIFFTX224 hash
function. This is 64.
- Overrides:
getDigestLength in class MessageDigest
- Returns:
- the number of bytes of the output of the SWIFFTX224 hash function
which is 64.
update
public void update(byte input)
- Update the digest using the specified byte.
- Overrides:
update in class MessageDigest
- Parameters:
input - the byte to use for the update
update
public void update(byte[] input,
int offset,
int len)
- Update the digest using the specified array of bytes, starting at the
specified offset.
- Overrides:
update in class 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