Class AesSpillCipher

    • Constructor Summary

      Constructors 
      Constructor Description
      AesSpillCipher()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      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
      String toString()  
    • Constructor Detail

      • AesSpillCipher

        public AesSpillCipher()
    • Method Detail

      • encryptedMaxLength

        public int encryptedMaxLength​(int inputLength)
        Description copied from interface: SpillCipher
        Calculates the maximum required buffer size to encrypt input data with the given length
        Specified by:
        encryptedMaxLength in interface SpillCipher
      • decryptedMaxLength

        public int decryptedMaxLength​(int encryptedLength)
        Description copied from interface: SpillCipher
        Calculates the required buffer size to decrypt data with the given encrypted length
        Specified by:
        decryptedMaxLength in interface SpillCipher
      • encrypt

        public int encrypt​(byte[] data,
                           int inputOffset,
                           int length,
                           byte[] destination,
                           int destinationOffset)
        Description copied from interface: SpillCipher
        Encrypts the contents of the input buffer into the destination buffer returning the number of bytes written into the destination buffer
        Specified by:
        encrypt in interface SpillCipher
        Returns:
        The length of the encrypted content in the destination buffer
      • decrypt

        public int decrypt​(byte[] encryptedData,
                           int inputOffset,
                           int length,
                           byte[] destination,
                           int destinationOffset)
        Description copied from interface: SpillCipher
        Decrypts the contents of the input buffer into the destination buffer, returning the number of bytes written into the destination buffer
        Specified by:
        decrypt in interface SpillCipher
        Returns:
        The length of the decrypted content in destination buffer
      • close

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