public final class Blake2b extends Object implements Blake2
| Constructor and Description |
|---|
Blake2b(int digestLength)
Creates a new unkeyed
Blake2b instance. |
Blake2b(int digestLength,
byte[] key)
Creates a new keyed
Blake2b instance. |
| Modifier and Type | Method and Description |
|---|---|
String |
algorithm()
Returns the algorithm name.
|
void |
burn()
Erases the key and resets the digest, thus making this instance
functionally equivalent to a newly created unkeyed digest.
|
Blake2b |
copy()
Returns a copy of this object.
|
byte[] |
digest()
Completes the digest computation.
|
int |
length()
Returns the digest's length (in bytes).
|
Blake2b |
reset()
Resets the digest.
|
Blake2b |
update(byte... input)
Updates the digest using the given array of bytes.
|
Blake2b |
update(byte input)
Updates the digest using the given byte.
|
Blake2b |
update(byte[] input,
int off,
int len)
Updates the digest using the specified number of bytes from the given
array, starting at the specified offset.
|
public Blake2b(int digestLength)
Blake2b instance.digestLength - the desired digest's length (in bytes).IllegalArgumentException - if digestLength is not in
the [1, 64] range.public Blake2b(int digestLength,
byte[] key)
Blake2b instance. If the key is empty,
then the created instance is equivalent to an unkeyed digest. The
given key can be safely erased from memory after this constructor has
been called.digestLength - the desired digest's length (in bytes).key - the key to use.NullPointerException - if key is null.IllegalArgumentException - if key's length is greater
than 64 or if digestLength is not in the
[1, 64] range.public String algorithm()
Blake2public void burn()
Blake2public int length()
Blake2public Blake2b reset()
Blake2public Blake2b update(byte input)
Blake2public Blake2b update(byte... input)
Blake2public Blake2b update(byte[] input, int off, int len)
Blake2Copyright © 2017–2018. All rights reserved.