Top Description Inners Fields Constructors Methods
org.bouncycastle.pqc.crypto.lms

pack-priv Class DigestUtil

extends Object
Class Inheritance
Imports
java.util.HashMap, .Map, org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.nist.NISTObjectIdentifiers, org.bouncycastle.crypto.Digest, org.bouncycastle.crypto.digests.SHA256Digest, .SHA512Digest, .SHAKEDigest

LMS digest utils provides oid mapping to provider digest name.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static Map<String, ASN1ObjectIdentifier>
private static Map<ASN1ObjectIdentifier, String>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static Digest
createDigest(ASN1ObjectIdentifier digOid, int digLen)

private static Digest
pack-priv static Digest
getDigest(LMOtsParameters otsParameters)

pack-priv static Digest
getDigest(LMSigParameters lmSigParameters)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameToOidback to summary
private static Map<String, ASN1ObjectIdentifier> nameToOid
oidToNameback to summary
private static Map<ASN1ObjectIdentifier, String> oidToName

Constructor Detail

DigestUtilback to summary
pack-priv DigestUtil()

Method Detail

createDigestback to summary
private static Digest createDigest(ASN1ObjectIdentifier digOid, int digLen)
createDigestback to summary
private static Digest createDigest(ASN1ObjectIdentifier oid)
getDigestback to summary
pack-priv static Digest getDigest(LMOtsParameters otsParameters)
getDigestback to summary
pack-priv static Digest getDigest(LMSigParameters lmSigParameters)
org.bouncycastle.pqc.crypto.lms back to summary

pack-priv Class DigestUtil.WrapperDigest

extends Object
implements Digest
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.Digest

Field Summary

Modifier and TypeField and Description
private final Digest
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
WrapperDigest(Digest dig, int length)

Method Summary

Modifier and TypeMethod and Description
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 void
reset()

Implements org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.
public void
update(byte
the input byte to be entered.
in
)

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a single byte.
public void
update(byte[]
the byte array containing the data.
in
,
int
the offset into the byte array where the data starts.
inOff
,
int
the length of the data.
len
)

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

digback to summary
private final Digest dig
lengthback to summary
private final int length

Constructor Detail

WrapperDigestback to summary
pack-priv WrapperDigest(Digest dig, int length)

Method Detail

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.

Annotations
@Override
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

Annotations
@Override
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.

Annotations
@Override
resetback to summary
public void reset()

Implements org.bouncycastle.crypto.Digest.reset.

Doc from org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.

Annotations
@Override
updateback to summary
public void update(byte in)

Implements org.bouncycastle.crypto.Digest.update.

Doc from org.bouncycastle.crypto.Digest.update.

update the message digest with a single byte.

Parameters
in:byte

the input byte to be entered.

Annotations
@Override
updateback to summary
public void update(byte[] in, int inOff, int len)

Implements org.bouncycastle.crypto.Digest.update.

Doc from org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.

Parameters
in:byte[]

the byte array containing the data.

inOff:int

the offset into the byte array where the data starts.

len:int

the length of the data.

Annotations
@Override