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
public class GoogleKmsSignature extends SignatureSpi
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
Nested Classes Modifier and Type Class Description static class
GoogleKmsSignature.RSAPSS
Implements generic RSA-PSS signing.static class
GoogleKmsSignature.WithSHA256
Implements signing with the SHA-256 message digest.static class
GoogleKmsSignature.WithSHA384
Implements signing with the SHA-384 message digest.static class
GoogleKmsSignature.WithSHA512
Implements signing with the SHA-512 message digest.
-
Field Summary
-
Fields inherited from class java.security.SignatureSpi
appRandom
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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[]
engineSign()
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 Detail
-
engineInitVerify
protected void engineInitVerify(PublicKey publicKey)
- Specified by:
engineInitVerify
in classSignatureSpi
-
engineInitSign
protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException
- 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
protected byte[] engineSign() throws SignatureException
- 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 protected Object engineGetParameter(String param) throws InvalidParameterException
Deprecated.- Specified by:
engineGetParameter
in classSignatureSpi
- Throws:
InvalidParameterException
-
-