Top Description Fields Constructors Methods
org.h2.security

public final Class SHA3

extends MessageDigest
Class Inheritance
Static Imports
org.h2.util.Bits.INT_VH_LE, .Bits.LONG_VH_LE

SHA-3 message digest family.

Field Summary

Modifier and TypeField and Description
private final byte[]
private int
private final int
private final int
private static final long[]
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long
private long

Constructor Summary

AccessConstructor and Description
private
SHA3(String algorithm, int digestLength)

Method Summary

Modifier and TypeMethod and Description
private void
absorb(byte[] data, int offset)

private void
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.

public static SHA3

Returns:

SHA3-224 message digest
getSha3_224
()

Returns a new instance of SHA3-224 message digest.

public static SHA3

Returns:

SHA3-256 message digest
getSha3_256
()

Returns a new instance of SHA3-256 message digest.

public static SHA3

Returns:

SHA3-384 message digest
getSha3_384
()

Returns a new instance of SHA3-384 message digest.

public static SHA3

Returns:

SHA3-512 message digest
getSha3_512
()

Returns a new instance of SHA3-512 message digest.

Inherited from java.security.MessageDigest:
clonedigestdigestdigestgetAlgorithmgetDigestLengthgetInstancegetInstancegetInstancegetProviderisEqualresettoStringupdateupdateupdateupdate

Field Detail

bufback to summary
private final byte[] buf
bufcntback to summary
private int bufcnt
digestLengthback to summary
private final int digestLength
rateback to summary
private final int rate
ROUND_CONSTANTSback to summary
private static final long[] ROUND_CONSTANTS
state00back to summary
private long state00
state01back to summary
private long state01
state02back to summary
private long state02
state03back to summary
private long state03
state04back to summary
private long state04
state05back to summary
private long state05
state06back to summary
private long state06
state07back to summary
private long state07
state08back to summary
private long state08
state09back to summary
private long state09
state10back to summary
private long state10
state11back to summary
private long state11
state12back to summary
private long state12
state13back to summary
private long state13
state14back to summary
private long state14
state15back to summary
private long state15
state16back to summary
private long state16
state17back to summary
private long state17
state18back to summary
private long state18
state19back to summary
private long state19
state20back to summary
private long state20
state21back to summary
private long state21
state22back to summary
private long state22
state23back to summary
private long state23
state24back to summary
private long state24

Constructor Detail

SHA3back to summary
private SHA3(String algorithm, int digestLength)

Method Detail

absorbback to summary
private void absorb(byte[] data, int offset)
absorbQueueback to summary
private void absorbQueue()
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.

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

Annotations
@Override
engineResetback to summary
protected void engineReset()

Implements abstract java.security.MessageDigestSpi.engineReset.

Doc from java.security.MessageDigestSpi.engineReset.

Resets the digest for further use.

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

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

Annotations
@Override
getSha3_224back to summary
public static SHA3 getSha3_224()

Returns a new instance of SHA3-224 message digest.

Returns:SHA3

SHA3-224 message digest

getSha3_256back to summary
public static SHA3 getSha3_256()

Returns a new instance of SHA3-256 message digest.

Returns:SHA3

SHA3-256 message digest

getSha3_384back to summary
public static SHA3 getSha3_384()

Returns a new instance of SHA3-384 message digest.

Returns:SHA3

SHA3-384 message digest

getSha3_512back to summary
public static SHA3 getSha3_512()

Returns a new instance of SHA3-512 message digest.

Returns:SHA3

SHA3-512 message digest