com.nimbusds.jose
Interface JWEDecrypter

All Superinterfaces:
JWEAlgorithmProvider
All Known Implementing Classes:
RSADecrypter

public interface JWEDecrypter
extends JWEAlgorithmProvider

Interface for decrypting JSON Web Encryption (JWE) objects.

Callers can query the decrypter to determine its algorithm capabilities as well as the JWE algorithms and header parameters that are accepted for processing.

Version:
$version$ (2012-10-16)
Author:
Vladimir Dzhuvinov

Method Summary
 byte[] decrypt(ReadOnlyJWEHeader header, 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.
 
Methods inherited from interface com.nimbusds.jose.JWEAlgorithmProvider
supportedAlgorithms, supportedEncryptionMethods
 

Method Detail

getJWEHeaderFilter

JWEHeaderFilter getJWEHeaderFilter()
Gets the JWE header filter associated with the decrypter. Specifies the names of those 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.

Returns:
The JWE header filter.

decrypt

byte[] decrypt(ReadOnlyJWEHeader header,
               Base64URL encryptedKey,
               Base64URL iv,
               Base64URL cipherText,
               Base64URL integrityValue)
               throws JOSEException
Decrypts the specified cipher text of a JWE Object.

Parameters:
header - 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.
Returns:
The clear text.
Throws:
JOSEException - If the JWE algorithm is not accepted, if a header parameter is not accepted, or if decryption failed for some other reason.


Copyright © 2013 NimbusDS. All Rights Reserved.