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

pack-priv Class SHA512tDigest

extends LongDigest
Class Inheritance
Imports
org.bouncycastle.util.Memoable, .MemoableResetException

FIPS 180-4 implementation of SHA-512/t

Field Summary

Modifier and TypeField and Description
private final int
private long
private long
private long
private long
private long
private long
private long
private long
Inherited from org.bouncycastle.crypto.fips.LongDigest:
H1H2H3H4H5H6H7H8K

Constructor Summary

AccessConstructor and Description
public
SHA512tDigest(int bitLength)

Standard constructor

public
SHA512tDigest(SHA512tDigest t)

Copy constructor.

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.
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.internal.Digest.doFinal.

close the digest, producing the final digest value.
public String
public int
getDigestSize()

Implements org.bouncycastle.crypto.internal.Digest.getDigestSize.

return the size, in bytes, of the digest produced by this message digest.
private static void
intToBigEndian(int n, byte[] bs, int off, int max)

private static void
longToBigEndian(long n, byte[] bs, int off, int max)

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.
private void
tIvGenerate(int bitLength)

Inherited from org.bouncycastle.crypto.fips.LongDigest:
copyInfinishgetByteLengthprocessBlockprocessLengthprocessWordupdateupdate

Field Detail

digestLengthback to summary
private final int digestLength
H1tback to summary
private long H1t
H2tback to summary
private long H2t
H3tback to summary
private long H3t
H4tback to summary
private long H4t
H5tback to summary
private long H5t
H6tback to summary
private long H6t
H7tback to summary
private long H7t
H8tback to summary
private long H8t

Constructor Detail

SHA512tDigestback to summary
public SHA512tDigest(int bitLength)

Standard constructor

SHA512tDigestback to summary
public SHA512tDigest(SHA512tDigest t)

Copy constructor. This will copy the state of the provided message 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.

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

Implements org.bouncycastle.crypto.internal.Digest.doFinal.

Doc from org.bouncycastle.crypto.internal.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.internal.Digest.getAlgorithmName.

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

return the algorithm name

Returns:String

the algorithm name

getDigestSizeback to summary
public int getDigestSize()

Implements org.bouncycastle.crypto.internal.Digest.getDigestSize.

Doc from org.bouncycastle.crypto.internal.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.

intToBigEndianback to summary
private static void intToBigEndian(int n, byte[] bs, int off, int max)
longToBigEndianback to summary
private static void longToBigEndian(long n, byte[] bs, int off, int max)
resetback to summary
public void reset()

Overrides org.bouncycastle.crypto.fips.LongDigest.reset.

Implements org.bouncycastle.crypto.internal.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.

tIvGenerateback to summary
private void tIvGenerate(int bitLength)