Interface EncryptionConfiguration
-
- All Known Implementing Classes:
AbstractEncryptionConfiguration,ECEncryption,RSAEncryption,SecretEncryption
public interface EncryptionConfigurationEncryption configuration.- Since:
- 1.0
- Author:
- Sergio del Amo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddecrypt(com.nimbusds.jwt.EncryptedJWT encryptedJWT)Decrypt an encrypted JWT.java.lang.Stringencrypt(com.nimbusds.jwt.JWT jwt)Encrypt a JWT.java.lang.StringsupportedAlgorithmsMessage()booleansupports(com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method)Whether this encryption configuration supports this algorithm and encryption method.
-
-
-
Method Detail
-
supportedAlgorithmsMessage
java.lang.String supportedAlgorithmsMessage()
- Returns:
- A message indicating the supported algorithms.
-
supports
boolean supports(com.nimbusds.jose.JWEAlgorithm algorithm, com.nimbusds.jose.EncryptionMethod method)Whether this encryption configuration supports this algorithm and encryption method.- Parameters:
algorithm- the encryption algorithmmethod- the encryption method- Returns:
- whether this encryption configuration supports this algorithm and encryption method
-
encrypt
java.lang.String encrypt(com.nimbusds.jwt.JWT jwt) throws com.nimbusds.jose.JOSEException, java.text.ParseExceptionEncrypt a JWT.- Parameters:
jwt- the JWT- Returns:
- the encrypted JWT
- Throws:
com.nimbusds.jose.JOSEException- exception when encrypting JWTjava.text.ParseException- exception when encrypting JWT
-
decrypt
void decrypt(com.nimbusds.jwt.EncryptedJWT encryptedJWT) throws com.nimbusds.jose.JOSEExceptionDecrypt an encrypted JWT.- Parameters:
encryptedJWT- the encrypted JWT- Throws:
com.nimbusds.jose.JOSEException- exception when decrypting the JWT
-
-