public final class JwtRsaSsaPkcs1SignKeyManager extends PrivateKeyTypeManager<JwtRsaSsaPkcs1PrivateKey,JwtRsaSsaPkcs1PublicKey>
JwtRsaSsaPkcs1PrivateKey keys and produces new instances
of JwtPublicKeySign.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.
|
JwtRsaSsaPkcs1PublicKey |
getPublicKey(JwtRsaSsaPkcs1PrivateKey privKeyProto)
Creates a public key from the given private key.
|
int |
getVersion()
Returns the version number of this KeyManager.
|
KeyTypeManager.KeyFactory<JwtRsaSsaPkcs1KeyFormat,JwtRsaSsaPkcs1PrivateKey> |
keyFactory()
Returns the
KeyTypeManager.KeyFactory for this key type. |
KeyData.KeyMaterialType |
keyMaterialType()
Returns the
KeyData.KeyMaterialType for this proto. |
JwtRsaSsaPkcs1PrivateKey |
parseKey(com.google.protobuf.ByteString byteString)
Parses a serialized key proto.
|
static void |
registerPair(boolean newKeyAllowed)
Registers the
RsaSsapkcs1SignKeyManager and the RsaSsapkcs1VerifyKeyManager
with the registry, so that the the RsaSsapkcs1-Keys can be used with Tink. |
void |
validateKey(JwtRsaSsaPkcs1PrivateKey privKey)
Checks if the given
keyProto is a valid key. |
getPublicKeyClassfipsStatus, firstSupportedPrimitiveClass, getKeyClass, getPrimitive, supportedPrimitivespublic String getKeyType()
KeyTypeManagergetKeyType in class KeyTypeManager<JwtRsaSsaPkcs1PrivateKey>public int getVersion()
KeyTypeManagergetVersion in class KeyTypeManager<JwtRsaSsaPkcs1PrivateKey>public JwtRsaSsaPkcs1PublicKey getPublicKey(JwtRsaSsaPkcs1PrivateKey privKeyProto)
PrivateKeyTypeManagergetPublicKey in class PrivateKeyTypeManager<JwtRsaSsaPkcs1PrivateKey,JwtRsaSsaPkcs1PublicKey>public KeyData.KeyMaterialType keyMaterialType()
KeyTypeManagerKeyData.KeyMaterialType for this proto.keyMaterialType in class KeyTypeManager<JwtRsaSsaPkcs1PrivateKey>public JwtRsaSsaPkcs1PrivateKey parseKey(com.google.protobuf.ByteString byteString) throws com.google.protobuf.InvalidProtocolBufferException
KeyTypeManagerImplement as return KeyProtoT.parseFrom(byteString);.
parseKey in class KeyTypeManager<JwtRsaSsaPkcs1PrivateKey>com.google.protobuf.InvalidProtocolBufferExceptionpublic void validateKey(JwtRsaSsaPkcs1PrivateKey privKey) throws GeneralSecurityException
KeyTypeManagerkeyProto is a valid key.validateKey in class KeyTypeManager<JwtRsaSsaPkcs1PrivateKey>GeneralSecurityException - if the passed keyProto is not valid in any way.public KeyTypeManager.KeyFactory<JwtRsaSsaPkcs1KeyFormat,JwtRsaSsaPkcs1PrivateKey> 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<JwtRsaSsaPkcs1PrivateKey>public static void registerPair(boolean newKeyAllowed)
throws GeneralSecurityException
RsaSsapkcs1SignKeyManager and the RsaSsapkcs1VerifyKeyManager
with the registry, so that the the RsaSsapkcs1-Keys can be used with Tink.GeneralSecurityException