Class AesGcmKeyManager


  • public final class AesGcmKeyManager
    extends java.lang.Object
    This key manager generates new AesGcmKey keys and produces new instances of AesGcmJce.
    • Method Detail

      • register

        public static void register​(boolean newKeyAllowed)
                             throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • aes128GcmTemplate

        public static final KeyTemplate aes128GcmTemplate()
        Returns:
        a KeyTemplate that generates new instances of AES-GCM with the following parameters:

        On Android KitKat (API level 19), the Aead instance generated by this key template does not support associated data. It might not work at all in older versions.

      • rawAes128GcmTemplate

        public static final KeyTemplate rawAes128GcmTemplate()
        Returns:
        a KeyTemplate that generates new instances of AES-GCM with the following parameters:

        Keys generated from this template should create ciphertexts compatible with other libraries.

        On Android KitKat (API level 19), the Aead instance generated by this key template does not support associated data. It might not work at all in older versions.

      • aes256GcmTemplate

        public static final KeyTemplate aes256GcmTemplate()
        Returns:
        a KeyTemplate that generates new instances of AES-GCM with the following parameters:

        On Android KitKat (API level 19), the Aead instance generated by this key template does not support associated data. It might not work at all in older versions.

      • rawAes256GcmTemplate

        public static final KeyTemplate rawAes256GcmTemplate()
        Returns:
        a KeyTemplate that generates new instances of AES-GCM with the following parameters:

        Keys generated from this template should create ciphertexts compatible with other libraries.

        On Android KitKat (API level 19), the Aead instance generated by this key template does not support associated data. It might not work at all in older versions.