public class Keccak256 extends DigestEngine
This class implements the Keccak-256 digest algorithm under the API.
==========================(LICENSE BEGIN)============================ Copyright (c) 2007-2010 Projet RNRT SAPHIR Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ===========================(LICENSE END)=============================
| 构造器和说明 |
|---|
Keccak256()
Create the engine.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Digest |
copy()
Clone the current state.
|
protected Digest |
copyState(org.brewchain.core.crypto.hash.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.
|
java.lang.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, updategetDigestLengthpublic Digest copy()
Digestpublic int engineGetDigestLength()
engineGetDigestLength 在类中 java.security.MessageDigestSpiprotected byte[] engineDigest()
engineDigest 在类中 java.security.MessageDigestSpiprotected void engineUpdate(byte arg0)
engineUpdate 在类中 java.security.MessageDigestSpiprotected void engineUpdate(byte[] arg0,
int arg1,
int arg2)
engineUpdate 在类中 java.security.MessageDigestSpiprotected void engineReset()
DigestEngineengineReset 在类中 DigestEngineorg.brewchain.core.crypto.fok.cryptohash.DigestEngineprotected void processBlock(byte[] data)
DigestEngineprocessBlock 在类中 DigestEnginedata - the data blockorg.brewchain.core.crypto.fok.cryptohash.DigestEngineprotected void doPadding(byte[] out,
int off)
DigestEngineDigestEngine.flush()
and then DigestEngine.update(byte) with the appropriate padding
data in order to get the full input data.doPadding 在类中 DigestEngineout - the output bufferoff - the output offsetorg.brewchain.core.crypto.fok.cryptohash.DigestEngineprotected void doInit()
DigestEngineMessageDigestSpi.engineGetDigestLength()doInit 在类中 DigestEngineorg.brewchain.core.crypto.fok.cryptohash.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.
-norg.brewchain.core.crypto.fok.cryptohash.Digestprotected Digest copyState(org.brewchain.core.crypto.hash.KeccakCore dst)
org.brewchain.core.crypto.fok.cryptohash.DigestEngine