public class Blake2xsDigest extends java.lang.Object implements 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.
|
java.lang.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 java.lang.String getAlgorithmName()
getAlgorithmName
in interface Digest
public int getDigestSize()
getDigestSize
in interface Digest
public int getByteLength()
getByteLength
in interface ExtendedDigest
public long getUnknownMaxLength()
public void update(byte in)
public void update(byte[] in, int inOff, int len)
public void reset()
public int doFinal(byte[] out, int outOffset)
public int doFinal(byte[] out, int outOff, int outLen)
public int doOutput(byte[] out, int outOff, int outLen)