public class BcPKCS12PBEOutputEncryptorBuilder
extends java.lang.Object
OutputEncryptor that applies one of the PKCS#12
password-based encryption schemes from RFC 7292 Appendix C. Defaults to SHA-1 as the KDF
digest with an iteration count of 1024.| Constructor and Description |
|---|
BcPKCS12PBEOutputEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
org.bouncycastle.crypto.BlockCipher engine)
Build an encryptor for the given PKCS#12 PBE algorithm using SHA-1 as the KDF digest.
|
BcPKCS12PBEOutputEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
org.bouncycastle.crypto.BlockCipher engine,
org.bouncycastle.crypto.ExtendedDigest pbeDigest)
Build an encryptor for the given PKCS#12 PBE algorithm and an explicit KDF digest.
|
| Modifier and Type | Method and Description |
|---|---|
OutputEncryptor |
build(char[] password)
Bind the builder to a password and return a configured
OutputEncryptor. |
BcPKCS12PBEOutputEncryptorBuilder |
setIterationCount(int iterationCount)
Override the iteration count used by the PKCS#12 KDF.
|
public BcPKCS12PBEOutputEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
org.bouncycastle.crypto.BlockCipher engine)
algorithm - the PKCS#12 PBE algorithm identifier.engine - the underlying block cipher to wrap with PKCS#7 padding.public BcPKCS12PBEOutputEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
org.bouncycastle.crypto.BlockCipher engine,
org.bouncycastle.crypto.ExtendedDigest pbeDigest)
algorithm - the PKCS#12 PBE algorithm identifier.engine - the underlying block cipher to wrap with PKCS#7 padding.pbeDigest - the digest to use inside the PKCS#12 KDF.public BcPKCS12PBEOutputEncryptorBuilder setIterationCount(int iterationCount)
iterationCount - the iteration count.public OutputEncryptor build(char[] password)
OutputEncryptor.password - the password used to derive the encryption key.