public final class AesSivKeyManager extends KeyTypeManager<com.google.crypto.tink.proto.AesSivKey>
AesSivKey
keys and produces new instances of AesSiv
.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyT>, KeyTypeManager.PrimitiveFactory<PrimitiveT,KeyT>
Modifier and Type | Method and Description |
---|---|
static KeyTemplate |
aes256SivTemplate() |
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<com.google.crypto.tink.proto.AesSivKeyFormat,com.google.crypto.tink.proto.AesSivKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
com.google.crypto.tink.proto.KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
com.google.crypto.tink.proto.AesSivKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static KeyTemplate |
rawAes256SivTemplate() |
static void |
register(boolean newKeyAllowed) |
void |
validateKey(com.google.crypto.tink.proto.AesSivKey key)
Checks if the given
keyProto is a valid key. |
getKeyClass, getPrimitive, supportedPrimitives
public String getKeyType()
KeyTypeManager
getKeyType
in class KeyTypeManager<com.google.crypto.tink.proto.AesSivKey>
public int getVersion()
KeyTypeManager
getVersion
in class KeyTypeManager<com.google.crypto.tink.proto.AesSivKey>
public com.google.crypto.tink.proto.KeyData.KeyMaterialType keyMaterialType()
KeyTypeManager
KeyData.KeyMaterialType
for this proto.keyMaterialType
in class KeyTypeManager<com.google.crypto.tink.proto.AesSivKey>
public void validateKey(com.google.crypto.tink.proto.AesSivKey key) throws GeneralSecurityException
KeyTypeManager
keyProto
is a valid key.validateKey
in class KeyTypeManager<com.google.crypto.tink.proto.AesSivKey>
GeneralSecurityException
- if the passed keyProto
is not valid in any way.public com.google.crypto.tink.proto.AesSivKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManager
Implement as return KeyProtoT.parseFrom(byteString);
.
parseKey
in class KeyTypeManager<com.google.crypto.tink.proto.AesSivKey>
com.google.protobuf.InvalidProtocolBufferException
public KeyTypeManager.KeyFactory<com.google.crypto.tink.proto.AesSivKeyFormat,com.google.crypto.tink.proto.AesSivKey> keyFactory()
KeyTypeManager
KeyTypeManager.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<com.google.crypto.tink.proto.AesSivKey>
public static void register(boolean newKeyAllowed) throws GeneralSecurityException
GeneralSecurityException
public static final KeyTemplate aes256SivTemplate()
KeyTemplate
that generates new instances of AES-SIV-CMAC keys.public static final KeyTemplate rawAes256SivTemplate()
KeyTemplate
that generates new instances of AES-SIV-CMAC keys. Keys generated
from this template create ciphertexts compatible with other libraries.