public class Blake2xsDigest extends Object implements org.bouncycastle.crypto.Xof
| Modifier and Type | Field and Description |
|---|---|
static int |
UNKNOWN_DIGEST_LENGTH
Magic number to indicate an unknown length of digest
|
| Constructor and Description |
|---|
Blake2xsDigest()
BLAKE2xs for hashing with unknown digest length
|
Blake2xsDigest(Blake2xsDigest digest) |
Blake2xsDigest(int digestBytes)
BLAKE2xs for hashing
|
Blake2xsDigest(int digestBytes,
byte[] key)
BLAKE2xs with key
|
Blake2xsDigest(int digestBytes,
byte[] key,
byte[] salt,
byte[] personalization)
BLAKE2xs with key, salt and personalization
|
| Modifier and Type | Method and Description |
|---|---|
int |
doFinal(byte[] out,
int outOffset)
Close the digest, producing the final digest value.
|
int |
doFinal(byte[] out,
int outOff,
int outLen)
Close the digest, producing the final digest value.
|
int |
doOutput(byte[] out,
int outOff,
int outLen)
Start outputting the results of the final calculation for this digest.
|
String |
getAlgorithmName()
Return the algorithm name.
|
int |
getByteLength()
Return the size in bytes of the internal buffer the digest applies its
compression function to.
|
int |
getDigestSize()
Return the size in bytes of the digest produced by this message digest.
|
long |
getUnknownMaxLength()
Return the maximum size in bytes the digest can produce when the length
is unknown
|
void |
reset()
Reset the digest back to its initial state.
|
void |
update(byte in)
Update the message digest with a single byte.
|
void |
update(byte[] in,
int inOff,
int len)
Update the message digest with a block of bytes.
|
public static final int UNKNOWN_DIGEST_LENGTH
public Blake2xsDigest()
public Blake2xsDigest(int digestBytes)
digestBytes - The desired digest length in bytes. Must be above 1 and less than 2^16-1public Blake2xsDigest(int digestBytes,
byte[] key)
digestBytes - The desired digest length in bytes. Must be above 1 and less than 2^16-1key - A key up to 32 bytes or nullpublic Blake2xsDigest(int digestBytes,
byte[] key,
byte[] salt,
byte[] personalization)
digestBytes - The desired digest length in bytes. Must be above 1 and less than 2^16-1key - A key up to 32 bytes or nullsalt - 8 bytes or nullpersonalization - 8 bytes or nullpublic Blake2xsDigest(Blake2xsDigest digest)
public String getAlgorithmName()
getAlgorithmName in interface org.bouncycastle.crypto.Digestpublic int getDigestSize()
getDigestSize in interface org.bouncycastle.crypto.Digestpublic int getByteLength()
getByteLength in interface org.bouncycastle.crypto.ExtendedDigestpublic long getUnknownMaxLength()
public void update(byte in)
update in interface org.bouncycastle.crypto.Digestin - the input byte to be entered.public void update(byte[] in,
int inOff,
int len)
update in interface org.bouncycastle.crypto.Digestin - the byte array containing the data.inOff - the offset into the byte array where the data starts.len - the length of the data.public void reset()
reset in interface org.bouncycastle.crypto.Digestpublic int doFinal(byte[] out,
int outOffset)
doFinal in interface org.bouncycastle.crypto.Digestout - the array the digest is to be copied into.outOffset - the offset into the out array the digest is to start at.public int doFinal(byte[] out,
int outOff,
int outLen)
doFinal in interface org.bouncycastle.crypto.Xofout - output array to write the output bytes to.outOff - offset to start writing the bytes at.outLen - the number of output bytes requested.public int doOutput(byte[] out,
int outOff,
int outLen)
doOutput in interface org.bouncycastle.crypto.Xofout - output array to write the output bytes to.outOff - offset to start writing the bytes at.outLen - the number of output bytes requested.Copyright © 2019. All rights reserved.