public interface ChunkedMacVerification
WARNING: Implementations of this interface are not thread-safe, so the caller must ensure thread-safety if accessing objects implementing this interface concurrently.
| Modifier and Type | Method and Description |
|---|---|
void |
update(ByteBuffer data)
Processes the next chunk of input, represented by
ByteBuffer data. |
void |
verifyMac()
Verifies that the provided data matches the tag.
|
void update(ByteBuffer data) throws GeneralSecurityException
ByteBuffer data.
In particular, reads the data.remaining() number of bytes from the provided buffer,
starting at the byte with position data.position().
Updates the inner state of the computation. Requires exclusive access.
NOTE: arbitrary slicing of data is permitted, i.e. a series of update()'s with
inputs "ab", "cd", and "ef" produces the same result as a series of
inputs "abc", "def".
IllegalStateException - if called after verifyMac()GeneralSecurityException - when something went wrong with the updatevoid verifyMac()
throws GeneralSecurityException
Requires exclusive access.
IllegalStateException - when called more than onceGeneralSecurityException - when the tag does not match the data