Interface Encryptor

All Known Implementing Classes:
AESEncryptor, CommonsCryptoAESEncryptor

@Public public interface Encryptor
Encryptors apply a cipher to an OutputStream to produce ciphertext.
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a stream for encryption
    int
    Get the cipher's internal block size
    byte[]
    Get the initialization vector
    int
    Get the expected length for the initialization vector
    void
    Reset state, reinitialize with the key and iv
    void
    setIv(byte[] iv)
    Set the initialization vector
    void
    setKey(Key key)
    Set the secret key
  • Method Details

    • setKey

      void setKey(Key key)
      Set the secret key
    • getIvLength

      Get the expected length for the initialization vector
      Returns:
      the expected length for the initialization vector
    • getBlockSize

      Get the cipher's internal block size
      Returns:
      the cipher's internal block size
    • getIv

      byte[] getIv()
      Get the initialization vector
    • setIv

      void setIv(byte[] iv)
      Set the initialization vector
    • createEncryptionStream

      Create a stream for encryption
    • reset

      void reset()
      Reset state, reinitialize with the key and iv