All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.provider.md.SHA0
java.lang.Object
|
+----java.security.MessageDigest
|
+----cryptix.provider.md.BlockMessageDigest
|
+----cryptix.provider.md.SHA0
- public final class SHA0
- extends BlockMessageDigest
- implements Cloneable
This class implements the SHA-0 message digest algorithm
(not to be confused with the revised SHA-1 algorithm). SHA-1
is preferred for new applications.
References:
- NIST FIPS PUB 180,
"Secure Hash Standard",
U.S. Department of Commerce, May 1993.
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.5 $
- Author:
- Systemics Ltd, David Hopwood
-
DATA_LENGTH
- Length of a block (i.e.
-
HASH_LENGTH
- Length of the final hash (in bytes).
-
SHA0()
- The public constructor.
-
engineDigest(byte[], int)
- Returns the digest of the data added and resets the digest.
-
engineGetDataLength()
- Returns the length of the data (in bytes) hashed in every transform.
-
engineGetDigestLength()
- Returns the length of the hash (in bytes).
-
engineReset()
- Initializes (resets) the message digest.
-
engineTransform(byte[])
- Adds data to the message digest.
-
main(String[])
- Entry point for
self_test
.
-
self_test()
- Do some basic tests.
HASH_LENGTH
public static final int HASH_LENGTH
- Length of the final hash (in bytes).
DATA_LENGTH
public static final int DATA_LENGTH
- Length of a block (i.e. the number of bytes hashed in every transform).
SHA0
public SHA0()
- The public constructor.
engineGetDigestLength
protected int engineGetDigestLength()
- Returns the length of the hash (in bytes).
engineGetDataLength
protected int engineGetDataLength()
- Returns the length of the data (in bytes) hashed in every transform.
- Overrides:
- engineGetDataLength in class BlockMessageDigest
engineReset
protected void engineReset()
- Initializes (resets) the message digest.
- Overrides:
- engineReset in class BlockMessageDigest
engineTransform
protected void engineTransform(byte in[])
- Adds data to the message digest.
- Parameters:
- data - The data to be added.
- offset - The start of the data in the array.
- length - The amount of data to add.
- Overrides:
- engineTransform in class BlockMessageDigest
engineDigest
protected byte[] engineDigest(byte in[],
int length)
- Returns the digest of the data added and resets the digest.
- Returns:
- the digest of all the data added to the message digest as a byte array.
- Overrides:
- engineDigest in class BlockMessageDigest
main
public static final void main(String argv[])
- Entry point for
self_test
.
self_test
public static final void self_test() throws Exception
- Do some basic tests.
Three of the validation data are included only, no output,
success or exception.
If you want more, write a test program!
- See Also:
- TestSHA0
All Packages Class Hierarchy This Package Previous Next Index