public class JcePKCSPBEInputDecryptorProviderBuilder
extends java.lang.Object
InputDecryptorProvider that handles the password-based
decryption schemes encountered in PKCS#12 / PKCS#8: the legacy pkcs-12PbeIds family
(RFC 7292 Appendix C), PBES2 / PBKDF2 and PBES2 / scrypt (RFC 8018, RFC 7914), and the older
PBE1 schemes (pbeWithMD5AndDES-CBC, pbeWithSHA1AndDES-CBC).| Constructor and Description |
|---|
JcePKCSPBEInputDecryptorProviderBuilder()
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
InputDecryptorProvider |
build(char[] password)
Bind the builder to a password and return an
InputDecryptorProvider that can
produce decryptors for the password-based algorithm identifiers it is asked for. |
JcePKCSPBEInputDecryptorProviderBuilder |
setKeySizeProvider(SecretKeySizeProvider keySizeProvider)
Set the lookup provider of AlgorithmIdentifier returning key_size_in_bits used to
handle PKCS5 decryption.
|
JcePKCSPBEInputDecryptorProviderBuilder |
setProvider(java.security.Provider provider) |
JcePKCSPBEInputDecryptorProviderBuilder |
setProvider(java.lang.String providerName) |
JcePKCSPBEInputDecryptorProviderBuilder |
setTryWrongPKCS12Zero(boolean tryWrong)
Enable a workaround for older PKCS#12 files that derive the encryption key without
applying the trailing zero byte that RFC 7292 requires.
|
public JcePKCSPBEInputDecryptorProviderBuilder()
public JcePKCSPBEInputDecryptorProviderBuilder setProvider(java.security.Provider provider)
public JcePKCSPBEInputDecryptorProviderBuilder setProvider(java.lang.String providerName)
public JcePKCSPBEInputDecryptorProviderBuilder setTryWrongPKCS12Zero(boolean tryWrong)
tryWrong - true to enable the workaround.public JcePKCSPBEInputDecryptorProviderBuilder setKeySizeProvider(SecretKeySizeProvider keySizeProvider)
keySizeProvider - a provider of integer secret key sizes.public InputDecryptorProvider build(char[] password)
InputDecryptorProvider that can
produce decryptors for the password-based algorithm identifiers it is asked for.password - the password used to derive the encryption key.