Interface ICipherMAC

All Superinterfaces:
ICipher
All Known Implementing Classes:
Nil

public interface ICipherMAC extends ICipher
Stream ciphers which also do MAC computation implement this interface.
  • Method Details

    • getMacSize

      int getMacSize()
      Returns:
      MAC size in bytes
    • processAAD

      void processAAD(byte[] buf, int ofs, int len) throws ESJException
      Processes AAD (additional authentication data).
      Parameters:
      buf - input buffer
      ofs - where to start reading from the input buffer
      len - 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

      void finalize(byte[] macBuf, int macOfs) throws ESJException
      Finalize and compute the MAC.
      Parameters:
      macBuf - MAC buffer
      macOfs - where to write MAC
      Throws:
      ESJException - if any error occurred