com.nimbusds.jose
Interface JWEEncrypter
- All Superinterfaces:
- JWEAlgorithmProvider
- All Known Implementing Classes:
- DirectEncrypter, RSAEncrypter
public interface JWEEncrypter
- extends JWEAlgorithmProvider
Interface for encrypting JSON Web Encryption (JWE) objects.
Callers can query the encrypter to determine its algorithm capabilities.
- Version:
- $version$ (2012-10-04)
- Author:
- Vladimir Dzhuvinov
encrypt
JWECryptoParts encrypt(ReadOnlyJWEHeader header,
byte[] clearText)
throws JOSEException
- Encrypts the specified clear text of a
JWE object
.
- Parameters:
header
- The JSON Web Encryption (JWE) header. Must specify a
supported JWE algorithm and must not be
null
.clearText
- The clear text to encrypt. Must not be null
.
- Returns:
- The resulting JWE crypto parts.
- Throws:
JOSEException
- If the JWE algorithm is not supported or if
encryption failed for some other reason.
Copyright © 2013 NimbusDS. All Rights Reserved.