public final class JH224
extends java.security.MessageDigest
A message digest algorithm represents the functionality of an one-way hash function for computing a fixed sized data value (message digest, hash) from input data of arbitrary size. The length of the resulting hash value usually is shorter than the length of the input data. Using a one-way hash function will make it easy to compute the hash from the given data, but hard to go the reverse way for calculating the input data when only the hash is known. Furthermore, a proper hash function should avoid any collision, meaning that it has to be hard to find two different messages producing the same hash value.
The JH-224 message digest algorithm produces a 224-bit hash-value of the given input data.
This class extends the java.security.MessageDigest class and
applications should use one of the getInstance methods presented
there to create a MessageDigest-JH object. Generally, an application wishing
to compute the message digest of some data has to perform three steps:
getInstance method, e.g.:
MessageDigest JH = MessageDigest.getInstance("JH224");
update methods,
e.g:
JH.update(m1);
JH.update(m2);
...
digest methods: byte[] hash_value = JH.digest();
There are several ways for combining update and
digest methods for computing a message digest. Since this class
implements the Cloneable interface, JH MessageDigest objects may
be used for compute intermediate hashes through cloning (see
http
://java.sun.com/products/JDK/1.2/docs/guide/security/CryptoSpec.html).
When the hash value successfully has been computed, the JH MessageDigest object automatically resets for being able to be supplied with new data to be hashed..
MessageDigest| Constructor and Description |
|---|
JH224()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
protected void |
doPadding() |
protected void |
engineCompress(byte[] input,
int offset) |
protected byte[] |
engineDigest() |
protected void |
engineDigest(byte[] output,
int offset) |
protected int |
engineGetDigestLength() |
protected void |
engineReset() |
protected void |
engineUpdate(byte input) |
protected void |
engineUpdate(byte[] input,
int offset,
int len) |
protected int engineGetDigestLength()
engineGetDigestLength in class java.security.MessageDigestSpiprotected void engineCompress(byte[] input,
int offset)
protected void doPadding()
protected void engineDigest(byte[] output,
int offset)
protected byte[] engineDigest()
engineDigest in class java.security.MessageDigestSpiprotected void engineUpdate(byte input)
engineUpdate in class java.security.MessageDigestSpiprotected void engineUpdate(byte[] input,
int offset,
int len)
engineUpdate in class java.security.MessageDigestSpiprotected void engineReset()
engineReset in class java.security.MessageDigestSpipublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.security.MessageDigestjava.lang.CloneNotSupportedException