public final class EciesAeadHkdfPrivateKeyManager extends PrivateKeyTypeManager<EciesAeadHkdfPrivateKey,EciesAeadHkdfPublicKey>
EciesAeadHkdfPrivateKey keys and produces new instances of
EciesAeadHkdfHybridDecrypt.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyProtoT extends com.google.protobuf.MessageLite>| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
eciesP256HkdfHmacSha256Aes128CtrHmacSha256Template() |
static KeyTemplate |
eciesP256HkdfHmacSha256Aes128GcmTemplate() |
String |
getKeyType()
Returns the type URL that identifies the key type of keys managed by this KeyManager.
|
EciesAeadHkdfPublicKey |
getPublicKey(EciesAeadHkdfPrivateKey key)
Creates a public key from the given private key.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<EciesAeadHkdfKeyFormat,EciesAeadHkdfPrivateKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
EciesAeadHkdfPrivateKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static KeyTemplate |
rawEciesP256HkdfHmacSha256Aes128CtrHmacSha256CompressedTemplate() |
static KeyTemplate |
rawEciesP256HkdfHmacSha256Aes128GcmCompressedTemplate() |
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(EciesAeadHkdfPrivateKey keyProto)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassfipsStatus, firstSupportedPrimitiveClass, getKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<EciesAeadHkdfPrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<EciesAeadHkdfPrivateKey>public EciesAeadHkdfPublicKey getPublicKey(EciesAeadHkdfPrivateKey key) throws GeneralSecurityException
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<EciesAeadHkdfPrivateKey,EciesAeadHkdfPublicKey>GeneralSecurityExceptionpublic KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<EciesAeadHkdfPrivateKey>public EciesAeadHkdfPrivateKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<EciesAeadHkdfPrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(EciesAeadHkdfPrivateKey keyProto) throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<EciesAeadHkdfPrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<EciesAeadHkdfKeyFormat,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<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.GeneralSecurityExceptionpublic static final KeyTemplate eciesP256HkdfHmacSha256Aes128GcmTemplate()
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.
public static final KeyTemplate rawEciesP256HkdfHmacSha256Aes128GcmCompressedTemplate()
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.
public static final KeyTemplate eciesP256HkdfHmacSha256Aes128CtrHmacSha256Template()
KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with
the following parameters:
KeyTemplate.OutputPrefixType#TINK
public static final KeyTemplate rawEciesP256HkdfHmacSha256Aes128CtrHmacSha256CompressedTemplate()
KeyTemplate that generates new instances of ECIES-AEAD-HKDF key pairs with
the following parameters:
KeyTemplate.OutputPrefixType#RAW (no prefix)