de.flexiprovider.core.md
Class Tiger
java.lang.Object
|
+--java.security.MessageDigestSpi
|
+--de.flexiprovider.api.MessageDigest
|
+--de.flexiprovider.core.md.Tiger
- public final class Tiger
- extends MessageDigest
Tiger is a fast new hash function, by Ross Anderson and Eli Biham. This class
is a simple Java implementation of the 192-bit Tiger algorithm, based on the
sample C code published by Eli Biham on
http://www.cs.technion.ac.il/~biham/Reports/Tiger/ in its HTML reference
Appendix.
It computes a 192-bit digest that is considered stronger, but faster to
compute than 160-bit SHA-1. Its input is a set of 64-bytes blocks. The last
block of a digested message must include a required padded byte which must be
0x01.
- Author:
- Elena Klintsevitch
|
Constructor Summary |
Tiger()
constructor for a new Tiger message digest |
|
Method Summary |
byte[] |
digest()
Compute the digest and reset the engine |
int |
getDigestLength()
|
void |
reset()
reset the engine to its initial state |
void |
update(byte b)
Update the engine with the specified byte. |
void |
update(byte[] bytes,
int offset,
int len)
Update the engine with the specified 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 |
ALG_NAME
public static final java.lang.String ALG_NAME
- The algorithm name.
OID
public static final java.lang.String OID
- The OID of Tiger (defined by the GNU project, see http://www.gnupg.org/oids.html).
Tiger
public Tiger()
- constructor for a new Tiger message digest
getDigestLength
public int getDigestLength()
- Overrides:
getDigestLength in class MessageDigest
- Returns:
- the digest length in bytes
update
public void update(byte b)
- Update the engine with the specified byte.
- Overrides:
update in class MessageDigest
- Parameters:
b - the input byte
update
public void update(byte[] bytes,
int offset,
int len)
- Update the engine with the specified byte array.
- Overrides:
update in class MessageDigest
- Parameters:
bytes - the inputoffset - the offset where the input startslen - the input length
digest
public byte[] digest()
- Compute the digest and reset the engine
- Overrides:
digest in class MessageDigest
- Returns:
- the message digest in a byte array
reset
public void reset()
- reset the engine to its initial state
- Overrides:
reset in class MessageDigest