public class Keccak256 extends DigestEngine
| Constructor and Description |
|---|
Keccak256()
Create the engine.
|
| Modifier and Type | Method and Description |
|---|---|
Digest |
copy()
Clone the current state.
|
protected Digest |
copyState(org.tron.common.crypto.cryptohash.KeccakCore dst) |
protected void |
doInit()
This function is called at object creation time; the implementation should use it to perform
initialization tasks.
|
protected void |
doPadding(byte[] out,
int off)
Perform the final padding and store the result in the provided buffer.
|
protected byte[] |
engineDigest() |
int |
engineGetDigestLength() |
protected void |
engineReset()
Reset the hash algorithm state.
|
protected void |
engineUpdate(byte arg0) |
protected void |
engineUpdate(byte[] arg0,
int arg1,
int arg2) |
int |
getBlockLength()
Return the "block length" for the hash function.
|
protected void |
processBlock(byte[] data)
Process one block of data.
|
String |
toString()
Get the display name for this function (e.g.
|
copyState, digest, digest, digest, flush, getBlockBuffer, getBlockCount, getInternalBlockLength, reset, update, update, updateclone, getAlgorithm, getDigestLength, getInstance, getInstance, getInstance, getProvider, isEqual, updateengineDigest, engineUpdateequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDigestLengthpublic Digest copy()
Digestpublic int engineGetDigestLength()
engineGetDigestLength in class MessageDigestSpiprotected byte[] engineDigest()
engineDigest in class MessageDigestSpiprotected void engineUpdate(byte arg0)
engineUpdate in class MessageDigestSpiprotected void engineUpdate(byte[] arg0,
int arg1,
int arg2)
engineUpdate in class MessageDigestSpiprotected void engineReset()
DigestEngineengineReset in class DigestEngineprotected void processBlock(byte[] data)
DigestEngineprocessBlock in class DigestEnginedata - the data blockprotected void doPadding(byte[] out,
int off)
DigestEngineDigestEngine.flush() and then DigestEngine.update(byte) with the appropriate padding data in order to getData
the full input data.doPadding in class DigestEngineout - the output bufferoff - the output offsetprotected void doInit()
DigestEngineMessageDigestSpi.engineGetDigestLength()doInit in class DigestEnginepublic int getBlockLength()
DigestReturn the "block length" for the hash function. This value is naturally defined for
iterated hash functions (Merkle-Damgard). It is used in HMAC (that's what the HMAC specification names the "B"
parameter).
If the function is "block-less" then this function may return -n
where n is an integer such that the block length for HMAC ("B") will be
inferred from the key length, by selecting the smallest multiple of n which is no
smaller than the key length. For instance, for the Fugue-xxx hash functions, this function
returns -4: the virtual block length B is the HMAC key length, rounded up to the next multiple
of 4.
-nprotected Digest copyState(org.tron.common.crypto.cryptohash.KeccakCore dst)
Copyright © 2020. All rights reserved.