Package com.nimbusds.jose.crypto.impl
Class PasswordBasedCryptoProvider
java.lang.Object
com.nimbusds.jose.crypto.impl.BaseJWEProvider
com.nimbusds.jose.crypto.impl.PasswordBasedCryptoProvider
- All Implemented Interfaces:
JCAAware<JWEJCAContext>
,JOSEProvider
,JWEProvider
- Direct Known Subclasses:
PasswordBasedDecrypter
,PasswordBasedEncrypter
The base abstract class for password-based encrypters and decrypters of
JWE objects
.
Supports the following key management algorithms:
Supports the following content encryption algorithms:
- Version:
- 2016-07-26
- Author:
- Vladimir Dzhuvinov
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Set<JWEAlgorithm>
The supported JWE algorithms by the password-based crypto provider class.static final Set<EncryptionMethod>
The supported encryption methods by the password-base crypto provider class. -
Constructor Summary
ModifierConstructorDescriptionprotected
PasswordBasedCryptoProvider
(byte[] password) Creates a new password-based encryption / decryption provider. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the password.Returns the password.Methods inherited from class com.nimbusds.jose.crypto.impl.BaseJWEProvider
getCEK, getJCAContext, isCEKProvided, supportedEncryptionMethods, supportedJWEAlgorithms
-
Field Details
-
SUPPORTED_ALGORITHMS
The supported JWE algorithms by the password-based crypto provider class. -
SUPPORTED_ENCRYPTION_METHODS
The supported encryption methods by the password-base crypto provider class.
-
-
Constructor Details
-
PasswordBasedCryptoProvider
Creates a new password-based encryption / decryption provider.- Parameters:
password
- The password bytes. Must not be empty ornull
.
-
-
Method Details
-
getPassword
Returns the password.- Returns:
- The password bytes.
-
getPasswordString
Returns the password.- Returns:
- The password as a UTF-8 encoded string.
-