public class HAVAL extends java.security.MessageDigest implements Parameterized, VariableLengthDigest, java.lang.Cloneable
HAVAL is a variable length MD with a variable number of passes. The values for these two parameters are read from the provider '.properties' file. Here is an example of the two property lines that do that:
Alg.passes.HAVAL = 3
Alg.bitLength.HAVAL = 256
References:
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.5 $
| Constructor and Description |
|---|
HAVAL() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a copy of this MD object.
|
protected byte[] |
engineDigest()
Completes the hash computation by performing final operations such
as padding.
|
protected int |
engineGetDigestLength()
SPI: Returns the digest length in bytes.
|
protected java.lang.Object |
engineGetParameter(java.lang.String param) |
protected void |
engineReset()
Resets this object disregarding any temporary data present at the
time of the invocation of this call.
|
protected void |
engineSetParameter(java.lang.String param,
java.lang.Object value) |
protected void |
engineUpdate(byte input)
Continues a HAVAL message digest using the input byte.
|
protected void |
engineUpdate(byte[] input,
int offset,
int len)
Hashes a byte array from a given offset for a specified length.
|
static LinkStatus |
getLinkStatus() |
java.lang.Object |
getParameter(java.lang.String param)
Gets the value of the specified algorithm parameter.
|
void |
setBitLength(int len)
Sets the output length of this HAVAL object in bits, resetting all
internal variables.
|
void |
setDigestLength(int len)
Sets the output length of this HAVAL object in bytes, resetting all
internal variables.
|
void |
setParameter(java.lang.String param,
java.lang.Object value)
Sets the specified algorithm parameter to the specified value.
|
void |
setPasses(int p)
Sets the number of passes for this HAVAL object, resetting all
internal variables.
|
public static LinkStatus getLinkStatus()
public java.lang.Object clone()
clone in class java.security.MessageDigestprotected void engineReset()
engineReset 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.MessageDigestSpiinput - byte array from which data is to be hashed.offset - start index of bytes to hash in input.len - number of bytes to hash.protected byte[] engineDigest()
engineDigest in class java.security.MessageDigestSpiprotected int engineGetDigestLength()
engineGetDigestLength in class java.security.MessageDigestSpipublic void setParameter(java.lang.String param,
java.lang.Object value)
throws NoSuchParameterException,
java.security.InvalidParameterException,
InvalidParameterTypeException
ParameterizedThis method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
setParameter in interface Parameterizedparam - the string identifier of the parameter.value - the parameter value.NoSuchParameterException - if there is no parameter with name
param for this cipher implementation.java.security.InvalidParameterException - if the parameter exists but cannot
be set (for example because the object is in the
wrong state).InvalidParameterTypeException - if value is the wrong type
for this parameter.public java.lang.Object getParameter(java.lang.String param)
throws NoSuchParameterException,
java.security.InvalidParameterException
ParameterizedThis method supplies a general-purpose mechanism through which it is possible to get the various parameters of this object. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.
getParameter in interface Parameterizedparam - the string name of the parameter.NoSuchParameterException - if there is no parameter with name
param for this implementation.java.security.InvalidParameterException - if the parameter exists but cannot
be read.protected void engineSetParameter(java.lang.String param,
java.lang.Object value)
throws NoSuchParameterException,
java.security.InvalidParameterException,
InvalidParameterTypeException
NoSuchParameterExceptionjava.security.InvalidParameterExceptionInvalidParameterTypeExceptionprotected java.lang.Object engineGetParameter(java.lang.String param)
throws NoSuchParameterException,
java.security.InvalidParameterException
NoSuchParameterExceptionjava.security.InvalidParameterExceptionpublic void setPasses(int p)
public void setBitLength(int len)
public void setDigestLength(int len)
setDigestLength in interface VariableLengthDigestlen - the new length in bytes.