From NIST Special Publication 800-185 - SHA-3 Derived Functions:cSHAKE, KMAC, TupleHash and ParallelHash
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final int | |
| private final byte[] | |
| private int | |
| private final CSHAKEDigest | |
| private final byte[] | |
| private final CSHAKEDigest | |
| private boolean | |
| private static final byte[] | |
| private int | |
| private final int | |
| private final CryptoServicePurpose |
| Access | Constructor and Description |
|---|---|
| public | ParallelHash(int
security strength (bits) of the underlying SHAKE function, 128 or 256. bitLength, byte[] the customization string - available for local use. S, int the blocksize (in bytes) for hashing. B)Base constructor. |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| 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. |
| public int | doFinal(byte[]
output array to write the output bytes to. out, int offset to start writing the bytes at. outOff, int the number of output bytes requested. outLen)Implements org. |
| public int | doOutput(byte[]
output array to write the output bytes to. out, int offset to start writing the bytes at. outOff, int the number of output bytes requested. outLen)Implements org. |
| public String | getAlgorithmName()
Implements org. |
| public int | getByteLength()
Implements org. |
| public int | getDigestSize()
Implements org. |
| public void | reset()
Implements org. |
| public void | update(byte
the input byte to be entered. in)Implements org. |
| 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. |
| private void |
| B | back to summary |
|---|---|
| private final int B | |
| bitLength | back to summary |
|---|---|
| private final int bitLength | |
| buffer | back to summary |
|---|---|
| private final byte[] buffer | |
| bufOff | back to summary |
|---|---|
| private int bufOff | |
| compressor | back to summary |
|---|---|
| private final CSHAKEDigest compressor | |
| compressorBuffer | back to summary |
|---|---|
| private final byte[] compressorBuffer | |
| cshake | back to summary |
|---|---|
| private final CSHAKEDigest cshake | |
| firstOutput | back to summary |
|---|---|
| private boolean firstOutput | |
| N_PARALLEL_HASH | back to summary |
|---|---|
| private static final byte[] N_PARALLEL_HASH | |
| nCount | back to summary |
|---|---|
| private int nCount | |
| outputLength | back to summary |
|---|---|
| private final int outputLength | |
| purpose | back to summary |
|---|---|
| private final CryptoServicePurpose purpose | |
| ParallelHash | back to summary |
|---|---|
| public ParallelHash(int bitLength, byte[] S, int B) Base constructor.
| |
| ParallelHash | back to summary |
|---|---|
| public ParallelHash(int bitLength, byte[] S, int B, int outputSize) | |
| ParallelHash | back to summary |
|---|---|
| public ParallelHash(int bitLength, byte[] S, int B, int outputSize, CryptoServicePurpose purpose) | |
| ParallelHash | back to summary |
|---|---|
| public ParallelHash(ParallelHash source) | |
| compress | back to summary |
|---|---|
| private void compress() | |
| compress | back to summary |
|---|---|
| private void compress(byte[] buf, int offSet, int len) | |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff) throws DataLengthException, IllegalStateException Implements org. Doc from org. close the digest, producing the final digest value. The doFinal call leaves the digest reset.
| |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff, int outLen) Implements org. Doc from org. Output the results of the final calculation for this digest to outLen number of bytes.
| |
| doOutput | back to summary |
|---|---|
| public int doOutput(byte[] out, int outOff, int outLen) Implements org. Doc from org. Start outputting the results of the final calculation for this digest. Unlike doFinal, this method will continue producing output until the Xof is explicitly reset, or signals otherwise.
| |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. return the algorithm name
| |
| getByteLength | back to summary |
|---|---|
| public int getByteLength() Implements org. Doc from org. Return the size in bytes of the internal buffer the digest applies it's compression function to.
| |
| getDigestSize | back to summary |
|---|---|
| public int getDigestSize() Implements org. Doc from org. return the size, in bytes, of the digest produced by this message digest.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. reset the digest back to it's initial state. | |
| update | back to summary |
|---|---|
| public void update(byte in) throws IllegalStateException Implements org. Doc from org. update the message digest with a single byte.
| |
| update | back to summary |
|---|---|
| public void update(byte[] in, int inOff, int len) throws DataLengthException, IllegalStateException Implements org. Doc from org. update the message digest with a block of bytes.
| |
| wrapUp | back to summary |
|---|---|
| private void wrapUp(int outputSize) | |