Package com.nimbusds.jose
Interface JWEDecrypter
- All Superinterfaces:
JCAAware<JWEJCAContext>,JOSEProvider,JWEProvider
- All Known Implementing Classes:
AESDecrypter,DirectDecrypter,ECDH1PUDecrypter,ECDH1PUX25519Decrypter,ECDHDecrypter,MultiDecrypter,PasswordBasedDecrypter,RSADecrypter,X25519Decrypter
JSON Web Encryption (JWE) decrypter.
- Version:
- 2023-03-26
- Author:
- Vladimir Dzhuvinov, Egor Puzanov
-
Method Summary
Methods inherited from interface com.nimbusds.jose.jca.JCAAware
getJCAContextMethods inherited from interface com.nimbusds.jose.JWEProvider
supportedEncryptionMethods, supportedJWEAlgorithms
-
Method Details
-
decrypt
byte[] decrypt(JWEHeader header, Base64URL encryptedKey, Base64URL iv, Base64URL cipherText, Base64URL authTag, byte[] aad) throws JOSEException Decrypts the specified cipher text of aJWE Object.- Parameters:
header- The JSON Web Encryption (JWE) header. Must specify a supported JWE algorithm and method. Must not benull.encryptedKey- The encrypted key,nullif not required by the JWE algorithm.iv- The initialisation vector,nullif not required by the JWE algorithm.cipherText- The cipher text to decrypt. Must not benull.authTag- The authentication tag,nullif not required.aad- The additional authenticated data. Must not benull.- Returns:
- The clear text.
- Throws:
JOSEException- If the JWE algorithm or method is not supported, if a critical header parameter is not supported or marked for deferral to the application, or if decryption failed for some other reason.
-