Class AesGcmDecryptor

  • All Implemented Interfaces:
    IDecryptor

    public class AesGcmDecryptor
    extends java.lang.Object
    implements IDecryptor
    Class for decrypting aes-gcm encrypted bytes.
    • Constructor Summary

      Constructors 
      Constructor Description
      AesGcmDecryptor​(byte[] key, int off, int len)
      Creates a new instance of AesGcmDecryptor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] finish()
      Finishes a multiple-part decryption operation.
      byte[] update​(byte[] b, int off, int len)
      Continues a multiple-part decryption operation, processing another data part and initializing aes-gcm cipher if this method called for the first time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        private final byte[] key
      • initiated

        private boolean initiated
      • iv

        private final byte[] iv
      • ivptr

        private int ivptr
    • Constructor Detail

      • AesGcmDecryptor

        public AesGcmDecryptor​(byte[] key,
                               int off,
                               int len)
        Creates a new instance of AesGcmDecryptor.
        Parameters:
        key - the byte array containing the key for decryption
        off - offset of the key in the byte array
        len - the length of the key in the byte array
    • Method Detail

      • update

        public byte[] update​(byte[] b,
                             int off,
                             int len)
        Continues a multiple-part decryption operation, processing another data part and initializing aes-gcm cipher if this method called for the first time.
        Specified by:
        update in interface IDecryptor
        Parameters:
        b - the input buffer
        off - the offset in input where the input starts
        len - the input length
        Returns:
        decrypted bytes array
      • finish

        public byte[] finish()
        Finishes a multiple-part decryption operation.
        Specified by:
        finish in interface IDecryptor
        Returns:
        input data that may have been buffered during a previous update operation