de.flexiprovider.core.md
Class FORK256
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--de.flexiprovider.api.MessageDigest
|
+--de.flexiprovider.core.md.FORK256
- public class FORK256
- extends MessageDigest
This is an implementation of the FORK-256 Message digest
FORK-256 is a 256-bit hash and is meant to provide 128 bits of security
against collision attacks.
- Author:
- Paul Nguentcheu
|
Field Summary |
static java.lang.String |
ALG_NAME
The algorithm name. |
|
Constructor Summary |
FORK256()
Default constructor |
|
Method Summary |
byte[] |
digest()
Complete the hash computation by performing final operations such as
padding. |
int |
getDigestLength()
|
void |
reset()
Reset the digest objects to its initial state. |
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.
FORK256
public FORK256()
- Default constructor
getDigestLength
public int getDigestLength()
- Overrides:
getDigestLength in class MessageDigest
- Returns:
- the digest length in bytes
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 byte array to use for the updateoffset - the offset to start from in the byte arraylen - the number of bytes to use
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
digest
public byte[] digest()
- Complete the hash computation by performing final operations such as
padding.
- Overrides:
digest in class MessageDigest
- Returns:
- the digest value
reset
public void reset()
- Reset the digest objects to its initial state.
- Overrides:
reset in class MessageDigest