Package org.forgerock.secrets.gcpkms
Class GoogleKmsSignature
java.lang.Object
java.security.SignatureSpi
org.forgerock.secrets.gcpkms.GoogleKmsSignature
- Direct Known Subclasses:
GoogleKmsSignature.WithSHA256
,GoogleKmsSignature.WithSHA384
,GoogleKmsSignature.WithSHA512
Implementation of the Java Signature SPI that delegates signature operations to the Google Cloud Platform Key
Management Service. This signature implementation only supports signing. For verification you should retrieve the
public key from the KMS and validate using the existing Java signature providers.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Implements generic RSA-PSS signing.static class
Implements signing with the SHA-256 message digest.static class
Implements signing with the SHA-384 message digest.static class
Implements signing with the SHA-512 message digest. -
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
engineGetParameter
(String param) Deprecated.protected void
engineInitSign
(PrivateKey privateKey) protected void
engineInitVerify
(PublicKey publicKey) protected void
engineSetParameter
(String param, Object value) Deprecated.protected byte[]
protected void
engineUpdate
(byte b) protected void
engineUpdate
(byte[] b, int off, int len) protected boolean
engineVerify
(byte[] sigBytes) Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Method Details
-
engineInitVerify
- Specified by:
engineInitVerify
in classSignatureSpi
-
engineInitSign
- Specified by:
engineInitSign
in classSignatureSpi
- Throws:
InvalidKeyException
-
engineUpdate
protected void engineUpdate(byte b) - Specified by:
engineUpdate
in classSignatureSpi
-
engineUpdate
protected void engineUpdate(byte[] b, int off, int len) - Specified by:
engineUpdate
in classSignatureSpi
-
engineSign
- Specified by:
engineSign
in classSignatureSpi
- Throws:
SignatureException
-
engineVerify
protected boolean engineVerify(byte[] sigBytes) - Specified by:
engineVerify
in classSignatureSpi
-
engineSetParameter
@Deprecated protected void engineSetParameter(String param, Object value) throws InvalidParameterException Deprecated.- Specified by:
engineSetParameter
in classSignatureSpi
- Throws:
InvalidParameterException
-
engineGetParameter
Deprecated.- Specified by:
engineGetParameter
in classSignatureSpi
- Throws:
InvalidParameterException
-