Interface SpillCipher

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AesSpillCipher

public interface SpillCipher extends AutoCloseable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destroys the cipher, preventing future use.
    int
    decrypt(byte[] encryptedData, int inputOffset, int length, byte[] destination, int destinationOffset)
    Decrypts the contents of the input buffer into the destination buffer, returning the number of bytes written into the destination buffer
    int
    decryptedMaxLength(int encryptedLength)
    Calculates the required buffer size to decrypt data with the given encrypted length
    int
    encrypt(byte[] data, int inputOffset, int length, byte[] destination, int destinationOffset)
    Encrypts the contents of the input buffer into the destination buffer returning the number of bytes written into the destination buffer
    int
    encryptedMaxLength(int inputLength)
    Calculates the maximum required buffer size to encrypt input data with the given length
  • Method Details

    • encryptedMaxLength

      int encryptedMaxLength(int inputLength)
      Calculates the maximum required buffer size to encrypt input data with the given length
    • encrypt

      int encrypt(byte[] data, int inputOffset, int length, byte[] destination, int destinationOffset)
      Encrypts the contents of the input buffer into the destination buffer returning the number of bytes written into the destination buffer
      Returns:
      The length of the encrypted content in the destination buffer
    • decryptedMaxLength

      int decryptedMaxLength(int encryptedLength)
      Calculates the required buffer size to decrypt data with the given encrypted length
    • decrypt

      int decrypt(byte[] encryptedData, int inputOffset, int length, byte[] destination, int destinationOffset)
      Decrypts the contents of the input buffer into the destination buffer, returning the number of bytes written into the destination buffer
      Returns:
      The length of the decrypted content in destination buffer
    • close

      void close()
      Destroys the cipher, preventing future use. Implementations should allow this to be called multiple times without failing.
      Specified by:
      close in interface AutoCloseable