Interface BlockCipher.Decryptor

  • Enclosing interface:
    BlockCipher

    public static interface BlockCipher.Decryptor
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] decrypt​(byte[] lengthAndCiphertext, byte[] AAD)
      Decrypts the ciphertext.
      byte[] decrypt​(InputStream from, byte[] AAD)
      Convenience decryption method that reads the length and ciphertext from the input stream.
    • Method Detail

      • decrypt

        byte[] decrypt​(byte[] lengthAndCiphertext,
                       byte[] AAD)
        Decrypts the ciphertext.
        Parameters:
        lengthAndCiphertext - - The first 4 bytes of the input are the ciphertext length (little endian int). The ciphertext starts at offset 4 and fills up the rest of the input byte array. The ciphertext includes the nonce and (in case of GCM cipher) the tag, as detailed in the Parquet Modular Encryption specification.
        AAD - - Additional Authenticated Data for the decryption (ignored in case of CTR cipher)
        Returns:
        plaintext - starts at offset 0 of the output value, and fills up the entire byte array.
      • decrypt

        byte[] decrypt​(InputStream from,
                       byte[] AAD)
                throws IOException
        Convenience decryption method that reads the length and ciphertext from the input stream.
        Parameters:
        from - Input stream with length and ciphertext.
        AAD - - Additional Authenticated Data for the decryption (ignored in case of CTR cipher)
        Returns:
        plaintext - starts at offset 0 of the output, and fills up the entire byte array.
        Throws:
        IOException - - Stream I/O problems