public class KmsEnvelopeAeadKeyManager extends KeyTypeManager<KmsEnvelopeAeadKey>
KmsEnvelopeAeadKey keys and produces new instances of
KmsEnvelopeAead.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyProtoT extends com.google.protobuf.MessageLite>| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
createKeyTemplate(String kekUri,
KeyTemplate dekTemplate)
Returns a new
KeyTemplate that can generate a KmsEnvelopeAeadKey whose key encrypting key (KEK) is pointing to
kekUri and DEK template is dekTemplate. |
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<KmsEnvelopeAeadKeyFormat,KmsEnvelopeAeadKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
KmsEnvelopeAeadKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static void |
register(boolean newKeyAllowed) |
void |
validateKey(KmsEnvelopeAeadKey key)
Checks if the given
keyProto is a valid key. |
fipsStatus, firstSupportedPrimitiveClass, getKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<KmsEnvelopeAeadKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<KmsEnvelopeAeadKey>public KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<KmsEnvelopeAeadKey>public void validateKey(KmsEnvelopeAeadKey key) throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<KmsEnvelopeAeadKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KmsEnvelopeAeadKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<KmsEnvelopeAeadKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic KeyTypeManager.KeyFactory<KmsEnvelopeAeadKeyFormat,KmsEnvelopeAeadKey> keyFactory()
KeyTypeManagerKeyTypeManager.KeyFactory for this key type.
By default, this throws an UnsupportedOperationException. Hence, if an implementation does not support creating primitives, no implementation is required.
keyFactory in class KeyTypeManager<KmsEnvelopeAeadKey>public static KeyTemplate createKeyTemplate(String kekUri, KeyTemplate dekTemplate)
KeyTemplate that can generate a KmsEnvelopeAeadKey whose key encrypting key (KEK) is pointing to
kekUri and DEK template is dekTemplate. Keys generated by this key template
uses RAW output prefix to make them compatible with the remote KMS' encrypt/decrypt operations.
Unlike other templates, when you call KeysetHandle#generateNew with this template, Tink
does not generate new key material, but only creates a reference to the remote KEK.public static void register(boolean newKeyAllowed)
throws GeneralSecurityException
GeneralSecurityException