Class AesGcmKeyManager
- java.lang.Object
-
- com.google.crypto.tink.aead.AesGcmKeyManager
-
public final class AesGcmKeyManager extends java.lang.ObjectThis key manager generates newAesGcmKeykeys and produces new instances ofAesGcmJce.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyTemplateaes128GcmTemplate()static KeyTemplateaes256GcmTemplate()static KeyTemplaterawAes128GcmTemplate()static KeyTemplaterawAes256GcmTemplate()static voidregister(boolean newKeyAllowed)
-
-
-
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
KeyTemplatethat generates new instances of AES-GCM with the following parameters:- Key size: 16 bytes
- Prefix type:
KeyTemplate.OutputPrefixType.TINK
On Android KitKat (API level 19), the
Aeadinstance 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
KeyTemplatethat generates new instances of AES-GCM with the following parameters:- Key size: 16 bytes
- Prefix type:
KeyTemplate.OutputPrefixType.RAW(no prefix)
Keys generated from this template should create ciphertexts compatible with other libraries.
On Android KitKat (API level 19), the
Aeadinstance 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
KeyTemplatethat generates new instances of AES-GCM with the following parameters:- Key size: 32 bytes
- Prefix type:
KeyTemplate.OutputPrefixType.TINK
On Android KitKat (API level 19), the
Aeadinstance 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
KeyTemplatethat generates new instances of AES-GCM with the following parameters:- Key size: 32 bytes
- Prefix type:
KeyTemplate.OutputPrefixType.RAW(no prefix)
Keys generated from this template should create ciphertexts compatible with other libraries.
On Android KitKat (API level 19), the
Aeadinstance generated by this key template does not support associated data. It might not work at all in older versions.
-
-