Package org.forgerock.json.jose.jwe
Class EncryptionManager
java.lang.Object
org.forgerock.json.jose.jwe.EncryptionManager
A service to get the appropriate EncryptionHandler for a specified Java Cryptographic encryption algorithm.
For details of all supported algorithms see JweAlgorithm
and for all supported encryption methods see
EncryptionMethod
- Since:
- 2.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEncryptionHandler
(JweHeader header) Gets the appropriate EncryptionHandler that can perform the required encryption algorithm, as described by the JweAlgorithm and EncryptionMethod in the given JweHeader.getEncryptionHandler
(JweHeader header, Key key) Gets the appropriate EncryptionHandler that can perform the required encryption algorithm, as described by the JweAlgorithm and EncryptionMethod in the given JweHeader.
-
Constructor Details
-
EncryptionManager
public EncryptionManager()
-
-
Method Details
-
getEncryptionHandler
Gets the appropriate EncryptionHandler that can perform the required encryption algorithm, as described by the JweAlgorithm and EncryptionMethod in the given JweHeader.- Parameters:
header
- The JweHeader containing the JweAlgorithm and EncryptionMethod to get the EncryptionHandler for.- Returns:
- The EncryptionHandler.
-
getEncryptionHandler
Gets the appropriate EncryptionHandler that can perform the required encryption algorithm, as described by the JweAlgorithm and EncryptionMethod in the given JweHeader. If non-null, the key parameter will be used to select an appropriate implementation.- Parameters:
header
- The JweHeader containing the JweAlgorithm and EncryptionMethod to get the EncryptionHandler for.key
- The encryption key. May be null.- Returns:
- The EncryptionHandler.
-