Top Description Fields Constructors Methods
org.bouncycastle.crypto.digests

public Class SHA384Digest

extends LongDigest
Class Inheritance
Imports
org.bouncycastle.crypto.CryptoServiceProperties, .CryptoServicePurpose, .CryptoServicesRegistrar, org.bouncycastle.util.Memoable, .Pack

FIPS 180-2 implementation of SHA-384.
        block  word  digest
SHA-1   512    32    160
SHA-256 512    32    256
SHA-384 1024   64    384
SHA-512 1024   64    512

Field Summary

Modifier and TypeField and Description
private static final int
Inherited from org.bouncycastle.crypto.digests.LongDigest:
H1H2H3H4H5H6H7H8Kpurpose

Constructor Summary

AccessConstructor and Description
public
SHA384Digest()

Standard constructor

public
SHA384Digest(CryptoServicePurpose purpose)

Standard constructor, with purpose

public
SHA384Digest(SHA384Digest t)

Copy constructor.

public
SHA384Digest(byte[]
the encoded state from the originating digest.
encodedState
)

State constructor - create a digest initialised with the state of a previous one.

Method Summary

Modifier and TypeMethod and Description
public Memoable
copy()

Implements org.bouncycastle.util.Memoable.copy.

Produce a copy of this object with its configuration and in its current state.

protected CryptoServiceProperties
public int
doFinal(byte[]
the array the digest is to be copied into.
out
,
int
the offset into the out array the digest is to start at.
outOff
)

Implements org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value.

public String
public int
getDigestSize()

Implements org.bouncycastle.crypto.Digest.getDigestSize.

return the size, in bytes, of the digest produced by this message digest.

public byte[]
getEncodedState()

Implements org.bouncycastle.crypto.digests.EncodableDigest.getEncodedState.

Return an encoded byte array for the digest's internal state

public void
public void
reset(Memoable
an object originally copied from an object of the same type as this instance.
other
)

Implements org.bouncycastle.util.Memoable.reset.

Restore a copied object state into this object.

Inherited from org.bouncycastle.crypto.digests.LongDigest:
copyInfinishgetByteLengthgetEncodedStateSizepopulateStateprocessBlockprocessLengthprocessWordrestoreStateupdateupdate

Field Detail

DIGEST_LENGTHback to summary
private static final int DIGEST_LENGTH

Constructor Detail

SHA384Digestback to summary
public SHA384Digest()

Standard constructor

SHA384Digestback to summary
public SHA384Digest(CryptoServicePurpose purpose)

Standard constructor, with purpose

SHA384Digestback to summary
public SHA384Digest(SHA384Digest t)

Copy constructor. This will copy the state of the provided message digest.

SHA384Digestback to summary
public SHA384Digest(byte[] encodedState)

State constructor - create a digest initialised with the state of a previous one.

Parameters
encodedState:byte[]

the encoded state from the originating digest.

Method Detail

copyback to summary
public Memoable copy()

Implements org.bouncycastle.util.Memoable.copy.

Doc from org.bouncycastle.util.Memoable.copy.

Produce a copy of this object with its configuration and in its current state.

The returned object may be used simply to store the state, or may be used as a similar object starting from the copied state.

cryptoServicePropertiesback to summary
protected CryptoServiceProperties cryptoServiceProperties()

Implements abstract org.bouncycastle.crypto.digests.LongDigest.cryptoServiceProperties.

doFinalback to summary
public int doFinal(byte[] out, int outOff)

Implements org.bouncycastle.crypto.Digest.doFinal.

Doc from org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value. The doFinal call leaves the digest reset.

Parameters
out:byte[]

the array the digest is to be copied into.

outOff:int

the offset into the out array the digest is to start at.

getAlgorithmNameback to summary
public String getAlgorithmName()

Implements org.bouncycastle.crypto.Digest.getAlgorithmName.

Doc from org.bouncycastle.crypto.Digest.getAlgorithmName.

return the algorithm name

Returns:String

the algorithm name

getDigestSizeback to summary
public int getDigestSize()

Implements org.bouncycastle.crypto.Digest.getDigestSize.

Doc from org.bouncycastle.crypto.Digest.getDigestSize.

return the size, in bytes, of the digest produced by this message digest.

Returns:int

the size, in bytes, of the digest produced by this message digest.

getEncodedStateback to summary
public byte[] getEncodedState()

Implements org.bouncycastle.crypto.digests.EncodableDigest.getEncodedState.

Doc from org.bouncycastle.crypto.digests.EncodableDigest.getEncodedState.

Return an encoded byte array for the digest's internal state

Returns:byte[]

an encoding of the digests internal state.

resetback to summary
public void reset()

Overrides org.bouncycastle.crypto.digests.LongDigest.reset.

Implements org.bouncycastle.crypto.Digest.reset.

reset the chaining variables

resetback to summary
public void reset(Memoable other)

Implements org.bouncycastle.util.Memoable.reset.

Doc from org.bouncycastle.util.Memoable.reset.

Restore a copied object state into this object.

Implementations of this method should try to avoid or minimise memory allocation to perform the reset.

Parameters
other:Memoable

an object originally copied from an object of the same type as this instance.