Class CipherAndAuthTag


  • public class CipherAndAuthTag
    extends java.lang.Object
    Encapsulate Cipher and AuthTag.
    • Constructor Summary

      Constructors 
      Constructor Description
      CipherAndAuthTag​(byte[] key, byte[] iv, byte[] authTag, boolean wasPreKey)  
    • Constructor Detail

      • CipherAndAuthTag

        public CipherAndAuthTag​(byte[] key,
                                byte[] iv,
                                byte[] authTag,
                                boolean wasPreKey)
    • Method Detail

      • decrypt

        public java.lang.String decrypt​(byte[] ciphertext)
                                 throws java.security.InvalidKeyException,
                                        javax.crypto.IllegalBlockSizeException,
                                        javax.crypto.BadPaddingException,
                                        java.security.NoSuchAlgorithmException,
                                        javax.crypto.NoSuchPaddingException,
                                        java.security.InvalidAlgorithmParameterException
        Throws:
        java.security.InvalidKeyException
        javax.crypto.IllegalBlockSizeException
        javax.crypto.BadPaddingException
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.InvalidAlgorithmParameterException
      • getKey

        public byte[] getKey()
      • getIv

        public byte[] getIv()