Interface ICipherMAC
- All Superinterfaces:
ICipher
- All Known Implementing Classes:
Nil
Stream ciphers which also do MAC computation implement this interface.
-
Field Summary
Fields inherited from interface com.coderslagoon.crypto.estreamj.framework.ICipher
MODE_DECRYPT, MODE_ENCRYPT -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize(byte[] macBuf, int macOfs) Finalize and compute the MAC.intvoidprocessAAD(byte[] buf, int ofs, int len) Processes AAD (additional authentication data).Methods inherited from interface com.coderslagoon.crypto.estreamj.framework.ICipher
erase, getKeySize, getNonceSize, getWordSize, isPatented, process, reset, setupKey, setupNonce
-
Method Details
-
getMacSize
int getMacSize()- Returns:
- MAC size in bytes
-
processAAD
Processes AAD (additional authentication data).- Parameters:
buf- input bufferofs- where to start reading from the input bufferlen- number of bytes to process, must be aligned to the cipher's word size except on the last call where an arbitrary size can be used- Throws:
ESJException- in any error occurred
-
finalize
Finalize and compute the MAC.- Parameters:
macBuf- MAC buffermacOfs- where to write MAC- Throws:
ESJException- if any error occurred
-