Package org.forgerock.json.crypto.simple
Class SimpleDecryptor
java.lang.Object
org.forgerock.json.crypto.simple.SimpleDecryptor
- All Implemented Interfaces:
JsonDecryptor
Decrypts a
$crypto
JSON object value encrypted with the
x-simple-encryption
type.-
Field Summary
-
Constructor Summary
ConstructorDescriptionSimpleDecryptor
(SimpleKeySelector simpleKeySelector) Constructor.SimpleDecryptor
(SimpleKeySelector simpleKeySelector, PurposeBasedKeySelector purposeBasedKeySelector) Constructor. -
Method Summary
-
Field Details
-
TYPE
The type of cryptographic representation that this decryptor supports.- See Also:
-
-
Constructor Details
-
SimpleDecryptor
Constructor.- Parameters:
simpleKeySelector
- TheSimpleKeySelector
to use for finding aKey
.
-
SimpleDecryptor
public SimpleDecryptor(SimpleKeySelector simpleKeySelector, PurposeBasedKeySelector purposeBasedKeySelector) Constructor.- Parameters:
simpleKeySelector
- TheSimpleKeySelector
to use for finding aKey
.purposeBasedKeySelector
- ThePurposeBasedKeySelector
to use for finding aKey
.
-
-
Method Details
-
getType
Description copied from interface:JsonDecryptor
Returns the type of cryptographic representation that this JSON decryptor supports. Expressed in thetype
property of aJsonCrypto
object.- Specified by:
getType
in interfaceJsonDecryptor
- Returns:
- The type.
-
decrypt
Description copied from interface:JsonDecryptor
Decrypts the specified value.- Specified by:
decrypt
in interfaceJsonDecryptor
- Parameters:
value
- the JSON value to be decrypted.- Returns:
- the decrypted value.
- Throws:
JsonCryptoException
- if the decryptor fails to decrypt the value.
-