Package org.forgerock.secrets.gcpkms
Class GoogleKmsKey
- java.lang.Object
-
- org.forgerock.secrets.gcpkms.GoogleKmsKey
-
- All Implemented Interfaces:
Serializable
,Key
- Direct Known Subclasses:
GoogleKmsPrivateKey
,GoogleKmsSecretKey
public abstract class GoogleKmsKey extends Object implements Key
Abstract base class for keys stored in Google KMS.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decrypt(byte[] ciphertext)
Decrypts the given ciphertext using this key.String
getAlgorithm()
byte[]
getEncoded()
Not supported.String
getFormat()
The format is set tonull
to match the result for a non-extractable PKCS#11 key.
-
-
-
Method Detail
-
getFormat
public String getFormat()
The format is set tonull
to match the result for a non-extractable PKCS#11 key.
-
decrypt
public byte[] decrypt(byte[] ciphertext)
Decrypts the given ciphertext using this key.- Parameters:
ciphertext
- the ciphertext to decrypt.- Returns:
- the decrypted plaintext.
- Throws:
UnsupportedOperationException
- if this key is not a decryption key.
-
getEncoded
public byte[] getEncoded()
Not supported.- Specified by:
getEncoded
in interfaceKey
- Throws:
UnsupportedOperationException
- as this is not supported for KMS keys.
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceKey
-
-