Top Fields Constructors Methods
org.bouncycastle.jcajce.provider

pack-priv final Class BaseMessageDigest

extends MessageDigest
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.security.MessageDigest, org.bouncycastle.crypto.OutputDigestCalculator, .Parameters, .UpdateOutputStream, org.bouncycastle.crypto.fips.FipsDigestOperatorFactory, .FipsSHS

Field Summary

Modifier and TypeField and Description
private final OutputDigestCalculator<T>
private final UpdateOutputStream
private static FipsDigestOperatorFactory<FipsSHS.Parameters>

Constructor Summary

AccessConstructor and Description
protected
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.security.MessageDigest.clone.

Returns a clone if the implementation is cloneable.
protected byte[]
engineDigest()

Implements abstract java.security.MessageDigestSpi.engineDigest.

Completes the hash computation by performing final operations such as padding.
protected int
engineGetDigestLength()

Overrides java.security.MessageDigestSpi.engineGetDigestLength.

Returns the digest length in bytes.
protected void
engineReset()

Implements abstract java.security.MessageDigestSpi.engineReset.

Resets the digest for further use.
protected void
engineUpdate(byte
the byte to use for the update.
input
)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified byte.
protected void
engineUpdate(byte[]
the array of bytes to use for the update.
input
,
int
the offset to start from in the array of bytes.
offset
,
int
the number of bytes to use, starting at offset.
len
)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified array of bytes, starting at the specified offset.
Inherited from java.security.MessageDigest:
digestdigestdigestgetAlgorithmgetDigestLengthgetInstancegetInstancegetInstancegetProviderisEqualresettoStringupdateupdateupdateupdate

Field Detail

digestCalculatorback to summary
private final OutputDigestCalculator<T> digestCalculator
digestStreamback to summary
private final UpdateOutputStream digestStream
fipsFactoryback to summary
private static FipsDigestOperatorFactory<FipsSHS.Parameters> fipsFactory

Constructor Detail

BaseMessageDigestback to summary
protected BaseMessageDigest(FipsSHS.Parameters algorithm)
BaseMessageDigestback to summary
pack-priv BaseMessageDigest(OutputDigestCalculator<T> digestCalculator)

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.security.MessageDigest.clone.

Doc from java.security.MessageDigest.clone.

Returns a clone if the implementation is cloneable.

Returns:Object

a clone if the implementation is cloneable.

Exceptions
CloneNotSupportedException:
if this is called on an implementation that does not support Cloneable.
engineDigestback to summary
protected byte[] engineDigest()

Implements abstract java.security.MessageDigestSpi.engineDigest.

Doc from java.security.MessageDigestSpi.engineDigest.

Completes the hash computation by performing final operations such as padding. Once engineDigest has been called, the engine should be reset (see engineReset). Resetting is the responsibility of the engine implementor.

Returns:byte[]

the array of bytes for the resulting hash value.

engineGetDigestLengthback to summary
protected int engineGetDigestLength()

Overrides java.security.MessageDigestSpi.engineGetDigestLength.

Doc from java.security.MessageDigestSpi.engineGetDigestLength.

Returns the digest length in bytes.

This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.)

The default behavior is to return 0.

This method may be overridden by a provider to return the digest length.

Returns:int

the digest length in bytes.

engineResetback to summary
protected void engineReset()

Implements abstract java.security.MessageDigestSpi.engineReset.

Doc from java.security.MessageDigestSpi.engineReset.

Resets the digest for further use.

engineUpdateback to summary
protected void engineUpdate(byte input)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Doc from java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified byte.

Parameters
input:byte

the byte to use for the update.

engineUpdateback to summary
protected void engineUpdate(byte[] input, int offset, int len)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Doc from java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified array of bytes, starting at the specified offset.

Parameters
input:byte[]

the array of bytes to use for the update.

offset:int

the offset to start from in the array of bytes.

len:int

the number of bytes to use, starting at offset.