public final class EciesAeadHkdfPrivateKeyManager extends PrivateKeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey,com.google.crypto.tink.proto.EciesAeadHkdfPublicKey>
EciesAeadHkdfPrivateKey keys and produces new instances of
EciesAeadHkdfHybridDecrypt.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyT>, KeyTypeManager.PrimitiveFactory<PrimitiveT,KeyT>| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
eciesP256HkdfHmacSha256Aes128CtrHmacSha256Template()
Deprecated.
use
KeyTemplates.get("ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256") |
static KeyTemplate |
eciesP256HkdfHmacSha256Aes128GcmTemplate()
Deprecated.
use
KeyTemplates.get("ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM") |
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
com.google.crypto.tink.proto.EciesAeadHkdfPublicKey |
getPublicKey(com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey key)
Creates a public key from the given private key.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<com.google.crypto.tink.proto.EciesAeadHkdfKeyFormat,com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey> |
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.EciesAeadHkdfPrivateKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static KeyTemplate |
rawEciesP256HkdfHmacSha256Aes128CtrHmacSha256CompressedTemplate()
Deprecated.
use
KeyTemplates.get("ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256_RAW") |
static KeyTemplate |
rawEciesP256HkdfHmacSha256Aes128GcmCompressedTemplate()
Deprecated.
use
KeyTemplates.get("ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_GCM_RAW") |
static void |
registerPair(boolean newKeyAllowed)
Registers the
EciesAeadHkdfPrivateKeyManager and the EciesAeadHkdfPublicKeyManager with the registry, so that the the EciesAeadHkdfKeys can be used
with Tink. |
void |
validateKey(com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey keyProto)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassgetKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey>public com.google.crypto.tink.proto.EciesAeadHkdfPublicKey getPublicKey(com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey key)
throws GeneralSecurityException
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey,com.google.crypto.tink.proto.EciesAeadHkdfPublicKey>GeneralSecurityExceptionpublic com.google.crypto.tink.proto.KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey>public com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey parseKey(com.google.protobuf.ByteString byteString)
throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey keyProto)
throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<com.google.crypto.tink.proto.EciesAeadHkdfKeyFormat,com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey> 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<com.google.crypto.tink.proto.EciesAeadHkdfPrivateKey>public static void registerPair(boolean newKeyAllowed)
throws GeneralSecurityException
EciesAeadHkdfPrivateKeyManager and the EciesAeadHkdfPublicKeyManager with the registry, so that the the EciesAeadHkdfKeys can be used
with Tink.GeneralSecurityException@Deprecated public static final KeyTemplate eciesP256HkdfHmacSha256Aes128GcmTemplate()
KeyTemplates.get("ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM")KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with
the following parameters:
KeyTemplate.OutputPrefixType#TINK
Unlike other key templates that use AES-GCM, the instances of HybridDecrypt
generated by this key template has no limitation on Android KitKat (API level 19). They
might not work in older versions though.
@Deprecated public static final KeyTemplate rawEciesP256HkdfHmacSha256Aes128GcmCompressedTemplate()
KeyTemplates.get("ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_GCM_RAW")KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with
the following parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix)
Unlike other key templates that use AES-GCM, the instances of HybridDecrypt
generated by this key template has no limitation on Android KitKat (API level 19). They
might not work in older versions though.
@Deprecated public static final KeyTemplate eciesP256HkdfHmacSha256Aes128CtrHmacSha256Template()
KeyTemplates.get("ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256")KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with
the following parameters:
KeyTemplate.OutputPrefixType#TINK
@Deprecated public static final KeyTemplate rawEciesP256HkdfHmacSha256Aes128CtrHmacSha256CompressedTemplate()
KeyTemplates.get("ECIES_P256_COMPRESSED_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256_RAW")KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with
the following parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix)