public interface MAC
HMAC| Modifier and Type | Method and Description |
|---|---|
byte[] |
digest()
Completes the MAC computation.
|
byte[] |
digest(byte... input)
Performs a final update on the MAC using the specified array of
bytes, then completes the MAC computation.
|
byte[] |
digest(byte[] input,
int off,
int len)
Performs a final update on the MAC using the specified data bytes,
then completes the MAC computation.
|
int |
length()
Returns the MAC's length (in bytes).
|
MAC |
reset()
Resets the engine.
|
MAC |
update(byte... input)
Updates the MAC using the specified array of bytes.
|
MAC |
update(byte input)
Updates the MAC using the given byte.
|
MAC |
update(byte[] input,
int off,
int len)
Updates the MAC using the specified number of bytes from the given
array of bytes, starting at the specified offset.
|
int length()
MAC reset()
MAC update(byte input)
input - the byte with which to update the MAC.MAC update(byte... input)
input - the array of bytes with which to update the MAC.NullPointerException - if input is null.MAC update(byte[] input, int off, int len)
input - the array of bytes.off - the offset to start from in the array of bytes, inclusive.len - the number of bytes to use, starting at offset.NullPointerException - if input is null.IndexOutOfBoundsException - if off is negative or if
off + len is greater than input's length.byte[] digest()
byte[] digest(byte... input)
update(byte...), passing the input array to the update
method, then calls digest(). Note that the engine is reset
after this call is made.input - the array of bytes with which to update the MAC before
completing its computation.NullPointerException - if input is null.byte[] digest(byte[] input,
int off,
int len)
update(byte[], int, int), passing the input array to the
update method, then calls digest(). Note that the engine is
reset after this call is made.input - the array of bytes.off - the offset to start from in the array of bytes, inclusive.len - the number of bytes to use, starting at off.NullPointerException - if input is null.IndexOutOfBoundsException - if off is negative or if
off + len is greater than input's length.Copyright © 2012–2015. All rights reserved.