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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleDecryptor(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- TheSimpleKeySelectorto use for finding aKey.
-
SimpleDecryptor
public SimpleDecryptor(SimpleKeySelector simpleKeySelector, PurposeBasedKeySelector purposeBasedKeySelector) Constructor.- Parameters:
simpleKeySelector- TheSimpleKeySelectorto use for finding aKey.purposeBasedKeySelector- ThePurposeBasedKeySelectorto use for finding aKey.
-
-
Method Details
-
getType
Description copied from interface:JsonDecryptorReturns the type of cryptographic representation that this JSON decryptor supports. Expressed in thetypeproperty of aJsonCryptoobject.- Specified by:
getTypein interfaceJsonDecryptor- Returns:
- The type.
-
decrypt
Description copied from interface:JsonDecryptorDecrypts the specified value.- Specified by:
decryptin interfaceJsonDecryptor- Parameters:
value- the JSON value to be decrypted.- Returns:
- the decrypted value.
- Throws:
JsonCryptoException- if the decryptor fails to decrypt the value.
-