|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.jose.crypto.RSADecrypter
public class RSADecrypter
This class is not fully tested and is provided for documentation and development purposes only. See Issue #11
Field Summary | |
---|---|
static JWEHeaderFilter |
HEADER_FILTER
|
static java.util.Set<JWEAlgorithm> |
SUPPORTED_ALGORITHMS
|
static java.util.Set<EncryptionMethod> |
SUPPORTED_ENCRYPTION_METHODS
|
Constructor Summary | |
---|---|
RSADecrypter(java.security.interfaces.RSAPrivateKey privateKey)
|
Method Summary | |
---|---|
protected byte[] |
aesgcmDecrypt(javax.crypto.spec.IvParameterSpec ivParamSpec,
javax.crypto.SecretKey secretKey,
byte[] cipherText)
|
protected byte[] |
aesgcmEncrypt(javax.crypto.spec.IvParameterSpec ivParamSpec,
javax.crypto.SecretKey secretKey,
byte[] cipherText)
|
byte[] |
decrypt(ReadOnlyJWEHeader readOnlyJWEHeader,
Base64URL encryptedKey,
Base64URL iv,
Base64URL cipherText,
Base64URL integrityValue)
Decrypts the specified cipher text of a JWE Object . |
JWEHeaderFilter |
getJWEHeaderFilter()
Gets the JWE header filter associated with the decrypter. |
protected int |
keyLengthForMethod(EncryptionMethod method)
Gets the Content Master Key (CMK) length for the specified encryption method. |
java.util.Set<JWEAlgorithm> |
supportedAlgorithms()
Returns the names of the supported JWE algorithms. |
java.util.Set<EncryptionMethod> |
supportedEncryptionMethods()
Returns the names of the supported encryption methods. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.nimbusds.jose.JWEAlgorithmProvider |
---|
supportedAlgorithms, supportedEncryptionMethods |
Field Detail |
---|
public static final JWEHeaderFilter HEADER_FILTER
public static final java.util.Set<JWEAlgorithm> SUPPORTED_ALGORITHMS
public static final java.util.Set<EncryptionMethod> SUPPORTED_ENCRYPTION_METHODS
Constructor Detail |
---|
public RSADecrypter(java.security.interfaces.RSAPrivateKey privateKey)
Method Detail |
---|
public JWEHeaderFilter getJWEHeaderFilter()
JWEDecrypter
supported JWE
algorithms
and header parameters that the decrypter is configured to
accept.
Attempting to decrypt
a JWE object with an
algorithm or header parameter that is not accepted must result in a
JOSEException
.
getJWEHeaderFilter
in interface JWEDecrypter
public byte[] decrypt(ReadOnlyJWEHeader readOnlyJWEHeader, Base64URL encryptedKey, Base64URL iv, Base64URL cipherText, Base64URL integrityValue) throws JOSEException
JWEDecrypter
JWE Object
.
decrypt
in interface JWEDecrypter
readOnlyJWEHeader
- The JSON Web Encryption (JWE) header. Must
specify an accepted JWE algorithm, must contain
only accepted header parameters, and must not
be null
.encryptedKey
- The encrypted key, null
if not required
by the JWE algorithm.iv
- The initialisation vector, null
if not
required by the JWE algorithm.cipherText
- The cipher text to decrypt. Must not be
null
.integrityValue
- The integrity value, null
if not
required by the JWE algorithm.
JOSEException
- If the JWE algorithm is not accepted, if a
header parameter is not accepted, or if
decryption failed for some other reason.public java.util.Set<JWEAlgorithm> supportedAlgorithms()
JWEAlgorithmProvider
alg
JWE header parameter.
supportedAlgorithms
in interface JWEAlgorithmProvider
public java.util.Set<EncryptionMethod> supportedEncryptionMethods()
JWEAlgorithmProvider
enc
JWE header parameter.
supportedEncryptionMethods
in interface JWEAlgorithmProvider
protected int keyLengthForMethod(EncryptionMethod method)
method
- The encryption method. Must be supported by this RSA
provider. Must not be null
.
protected byte[] aesgcmDecrypt(javax.crypto.spec.IvParameterSpec ivParamSpec, javax.crypto.SecretKey secretKey, byte[] cipherText) throws JOSEException
JOSEException
protected byte[] aesgcmEncrypt(javax.crypto.spec.IvParameterSpec ivParamSpec, javax.crypto.SecretKey secretKey, byte[] cipherText) throws JOSEException
JOSEException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |