Package com.nimbusds.jose.crypto.impl
Class RSACryptoProvider
- java.lang.Object
-
- com.nimbusds.jose.crypto.impl.RSACryptoProvider
-
- All Implemented Interfaces:
JCAAware<JWEJCAContext>
,JOSEProvider
,JWEProvider
- Direct Known Subclasses:
RSADecrypter
,RSAEncrypter
public abstract class RSACryptoProvider extends Object
The base abstract class for RSA encrypters and decrypters ofJWE objects
.Supports the following key management algorithms:
Supports the following content encryption algorithms:
- Version:
- 2021-09-23
- Author:
- David Ortiz, Vladimir Dzhuvinov
-
-
Field Summary
Fields Modifier and Type Field Description static Set<JWEAlgorithm>
SUPPORTED_ALGORITHMS
The supported JWE algorithms by the RSA crypto provider class.static Set<EncryptionMethod>
SUPPORTED_ENCRYPTION_METHODS
The supported encryption methods by the RSA crypto provider class.
-
Constructor Summary
Constructors Modifier Constructor Description protected
RSACryptoProvider()
Creates a new RSA encryption / decryption provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JWEJCAContext
getJCAContext()
Returns the Java Cryptography Architecture (JCA) context.Set<EncryptionMethod>
supportedEncryptionMethods()
Returns the names of the supported encryption methods by the JWE provier.Set<JWEAlgorithm>
supportedJWEAlgorithms()
Returns the names of the supported algorithms by the JWE provider instance.
-
-
-
Field Detail
-
SUPPORTED_ALGORITHMS
public static final Set<JWEAlgorithm> SUPPORTED_ALGORITHMS
The supported JWE algorithms by the RSA crypto provider class.
-
SUPPORTED_ENCRYPTION_METHODS
public static final Set<EncryptionMethod> SUPPORTED_ENCRYPTION_METHODS
The supported encryption methods by the RSA crypto provider class.
-
-
Constructor Detail
-
RSACryptoProvider
protected RSACryptoProvider()
Creates a new RSA encryption / decryption provider.
-
-
Method Detail
-
supportedJWEAlgorithms
public Set<JWEAlgorithm> supportedJWEAlgorithms()
Description copied from interface:JWEProvider
Returns the names of the supported algorithms by the JWE provider instance. These correspond to thealg
JWE header parameter.- Specified by:
supportedJWEAlgorithms
in interfaceJWEProvider
- Returns:
- The supported JWE algorithms, empty set if none.
-
supportedEncryptionMethods
public Set<EncryptionMethod> supportedEncryptionMethods()
Description copied from interface:JWEProvider
Returns the names of the supported encryption methods by the JWE provier. These correspond to theenc
JWE header parameter.- Specified by:
supportedEncryptionMethods
in interfaceJWEProvider
- Returns:
- The supported encryption methods, empty set if none.
-
getJCAContext
public JWEJCAContext getJCAContext()
Description copied from interface:JCAAware
Returns the Java Cryptography Architecture (JCA) context. May be used to set a specific JCA security provider or secure random generator.- Specified by:
getJCAContext
in interfaceJCAAware<JWEJCAContext>
- Returns:
- The JCA context. Not
null
.
-
-