public final class SHA0 extends BlockMessageDigest implements java.lang.Cloneable
BUG: The update method is missing.
References:
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.7 $
Modifier and Type | Field and Description |
---|---|
static int |
DATA_LENGTH
Length of a block (i.e.
|
static int |
HASH_LENGTH
Length of the final hash (in bytes).
|
Constructor and Description |
---|
SHA0()
The public constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a copy of this MD object.
|
protected byte[] |
engineDigest(byte[] in,
int length)
Returns the digest of the data added and resets the digest.
|
protected int |
engineGetDataLength()
Returns the length of the data (in bytes) hashed in every transform.
|
protected int |
engineGetDigestLength()
Returns the length of the hash (in bytes).
|
protected void |
engineReset()
Initializes (resets) the message digest.
|
protected void |
engineTransform(byte[] in)
Adds data to the message digest.
|
static void |
main(java.lang.String[] argv)
Entry point for
self_test . |
static void |
self_test()
Do some basic tests.
|
bitcount, engineDigest, engineUpdate, engineUpdate
public static final int HASH_LENGTH
public static final int DATA_LENGTH
protected int engineGetDigestLength()
engineGetDigestLength
in class java.security.MessageDigestSpi
protected int engineGetDataLength()
engineGetDataLength
in class BlockMessageDigest
public java.lang.Object clone()
clone
in class java.security.MessageDigest
protected void engineReset()
engineReset
in class BlockMessageDigest
protected void engineTransform(byte[] in)
engineTransform
in class BlockMessageDigest
data
- The data to be added.offset
- The start of the data in the array.length
- The amount of data to add.protected byte[] engineDigest(byte[] in, int length)
engineDigest
in class BlockMessageDigest
in
- the last incomplete block.length
- the length in bytes of the last block.public static final void main(java.lang.String[] argv)
self_test
.public static final void self_test() throws java.lang.Exception
java.lang.Exception
TestSHA0