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
public abstract class PasswordBasedCryptoProvider extends BaseJWEProvider
The base abstract class for password-based encrypters and decrypters ofJWE objects.Supports the following key management algorithms:
Supports the following content encryption algorithms:
- Version:
- 2016-07-26
- Author:
- Vladimir Dzhuvinov
-
-
Field Summary
Fields Modifier and Type Field Description static Set<JWEAlgorithm>SUPPORTED_ALGORITHMSThe supported JWE algorithms by the password-based crypto provider class.static Set<EncryptionMethod>SUPPORTED_ENCRYPTION_METHODSThe supported encryption methods by the password-base crypto provider class.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPasswordBasedCryptoProvider(byte[] password)Creates a new password-based encryption / decryption provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getPassword()Returns the password.StringgetPasswordString()Returns the password.-
Methods inherited from class com.nimbusds.jose.crypto.impl.BaseJWEProvider
getCEK, getJCAContext, isCEKProvided, supportedEncryptionMethods, supportedJWEAlgorithms
-
-
-
-
Field Detail
-
SUPPORTED_ALGORITHMS
public static final Set<JWEAlgorithm> SUPPORTED_ALGORITHMS
The supported JWE algorithms by the password-based crypto provider class.
-
SUPPORTED_ENCRYPTION_METHODS
public static final Set<EncryptionMethod> SUPPORTED_ENCRYPTION_METHODS
The supported encryption methods by the password-base crypto provider class.
-
-
Constructor Detail
-
PasswordBasedCryptoProvider
protected PasswordBasedCryptoProvider(byte[] password)
Creates a new password-based encryption / decryption provider.- Parameters:
password- The password bytes. Must not be empty ornull.
-
-
Method Detail
-
getPassword
public byte[] getPassword()
Returns the password.- Returns:
- The password bytes.
-
getPasswordString
public String getPasswordString()
Returns the password.- Returns:
- The password as a UTF-8 encoded string.
-
-