Package org.forgerock.json.jose.jwe
Class EncryptionManager
- java.lang.Object
-
- org.forgerock.json.jose.jwe.EncryptionManager
-
public class EncryptionManager extends Object
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 seeEncryptionMethod
- Since:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description EncryptionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncryptionHandler
getEncryptionHandler(JweHeader header)
Gets the appropriate EncryptionHandler that can perform the required encryption algorithm, as described by the JweAlgorithm and EncryptionMethod in the given JweHeader.EncryptionHandler
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.
-
-
-
Method Detail
-
getEncryptionHandler
public EncryptionHandler getEncryptionHandler(JweHeader header)
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
public EncryptionHandler 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. 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.
-
-