public final class AesGcmKeyManager extends Object
AesGcmKey keys and produces new instances of AesGcmJce.| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
aes128GcmTemplate() |
static KeyTemplate |
aes256GcmTemplate() |
static KeyTemplate |
rawAes128GcmTemplate() |
static KeyTemplate |
rawAes256GcmTemplate() |
static void |
register(boolean newKeyAllowed) |
public static void register(boolean newKeyAllowed)
throws GeneralSecurityException
GeneralSecurityExceptionpublic static final KeyTemplate aes128GcmTemplate()
KeyTemplate that generates new instances of AES-GCM with the following
parameters:
KeyTemplate.OutputPrefixType#TINK
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.
public static final KeyTemplate rawAes128GcmTemplate()
KeyTemplate that generates new instances of AES-GCM with the following
parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix)
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.
public static final KeyTemplate aes256GcmTemplate()
KeyTemplate that generates new instances of AES-GCM with the following
parameters:
KeyTemplate.OutputPrefixType#TINK
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.
public static final KeyTemplate rawAes256GcmTemplate()
KeyTemplate that generates new instances of AES-GCM with the following
parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix)
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.