public class HkdfPrfKeyManager extends KeyTypeManager<HkdfPrfKey>
HkdfPrfKey keys and produces new instances of HkdfStreamingPrf and HkdfPrf.KeyTypeManager.KeyFactory<KeyFormatProtoT extends com.google.protobuf.MessageLite,KeyProtoT extends com.google.protobuf.MessageLite>| Modifier and Type | Method and Description |
|---|---|
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.
|
static KeyTemplate |
hkdfSha256Template()
Generates a
KeyTemplate for HKDF-PRF keys with the following parameters. |
KeyTypeManager.KeyFactory<HkdfPrfKeyFormat,HkdfPrfKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
HkdfPrfKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static void |
register(boolean newKeyAllowed) |
static String |
staticKeyType() |
void |
validateKey(HkdfPrfKey key)
Checks if the given
keyProto is a valid key. |
fipsStatus, firstSupportedPrimitiveClass, getKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<HkdfPrfKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<HkdfPrfKey>public KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<HkdfPrfKey>public void validateKey(HkdfPrfKey key) throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<HkdfPrfKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public HkdfPrfKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<HkdfPrfKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic KeyTypeManager.KeyFactory<HkdfPrfKeyFormat,HkdfPrfKey> 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<HkdfPrfKey>public static void register(boolean newKeyAllowed)
throws GeneralSecurityException
GeneralSecurityExceptionpublic static String staticKeyType()
public static final KeyTemplate hkdfSha256Template()
KeyTemplate for HKDF-PRF keys with the following parameters.