Class AesGcmJceUtil


  • public final class AesGcmJceUtil
    extends java.lang.Object
    Helper functions for AES-GCM using JCE.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.security.spec.AlgorithmParameterSpec getParams​(byte[] iv)  
      static java.security.spec.AlgorithmParameterSpec getParams​(byte[] buf, int offset, int len)  
      static javax.crypto.SecretKey getSecretKey​(byte[] key)  
      static javax.crypto.Cipher getThreadLocalCipher()
      Returns a thread-local instance of the AES-GCM cipher.
      • Methods inherited from class java.lang.Object

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

      • getThreadLocalCipher

        public static javax.crypto.Cipher getThreadLocalCipher()
        Returns a thread-local instance of the AES-GCM cipher.
      • getSecretKey

        public static javax.crypto.SecretKey getSecretKey​(byte[] key)
                                                   throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • getParams

        public static java.security.spec.AlgorithmParameterSpec getParams​(byte[] iv)
      • getParams

        public static java.security.spec.AlgorithmParameterSpec getParams​(byte[] buf,
                                                                          int offset,
                                                                          int len)