|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.pkcs.jcajce.JcePKCSPBEOutputEncryptorBuilder
JCA-based builder for an OutputEncryptor that applies one of the password-based
encryption schemes used to protect PKCS#8 / PKCS#12 payloads:
the legacy PKCS#12 family (RFC 7292 Appendix C) — selected when
the constructor is passed one of those OIDs,
PBES2 (RFC 8018) — selected for any other key-encryption algorithm; the embedded
key-derivation function may be PBKDF2 or scrypt (RFC 7914) via an explicit
PBKDFConfig.
| Constructor Summary | |
JcePKCSPBEOutputEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionAlg)
Construct a builder for a single algorithm. |
|
JcePKCSPBEOutputEncryptorBuilder(org.bouncycastle.crypto.util.PBKDFConfig pbkdfAlgorithm,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionAlg)
Constructor allowing different derivation functions such as PBKDF2 and scrypt. |
|
| Method Summary | |
OutputEncryptor |
build(char[] password)
Bind the builder to a password and return a configured OutputEncryptor. |
JcePKCSPBEOutputEncryptorBuilder |
setIterationCount(int iterationCount)
Set the iteration count for the PBE calculation. |
JcePKCSPBEOutputEncryptorBuilder |
setKeySizeProvider(SecretKeySizeProvider keySizeProvider)
Set the lookup provider of AlgorithmIdentifier returning key_size_in_bits used to handle PKCS5 decryption. |
JcePKCSPBEOutputEncryptorBuilder |
setPRF(org.bouncycastle.asn1.x509.AlgorithmIdentifier prf)
Set the PRF to use for key generation. |
JcePKCSPBEOutputEncryptorBuilder |
setProvider(java.security.Provider provider)
|
JcePKCSPBEOutputEncryptorBuilder |
setProvider(java.lang.String providerName)
|
JcePKCSPBEOutputEncryptorBuilder |
setRandom(java.security.SecureRandom random)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JcePKCSPBEOutputEncryptorBuilder(org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionAlg)
keyEncryptionAlg - the algorithm identifier the encryptor should apply.
public JcePKCSPBEOutputEncryptorBuilder(org.bouncycastle.crypto.util.PBKDFConfig pbkdfAlgorithm,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionAlg)
pbkdfAlgorithm - key derivation algorithm definition to use.keyEncryptionAlg - encryption algorithm to apply the derived key with.| Method Detail |
public JcePKCSPBEOutputEncryptorBuilder setProvider(java.security.Provider provider)
public JcePKCSPBEOutputEncryptorBuilder setProvider(java.lang.String providerName)
public JcePKCSPBEOutputEncryptorBuilder setRandom(java.security.SecureRandom random)
public JcePKCSPBEOutputEncryptorBuilder setKeySizeProvider(SecretKeySizeProvider keySizeProvider)
keySizeProvider - a provider of integer secret key sizes.
public JcePKCSPBEOutputEncryptorBuilder setPRF(org.bouncycastle.asn1.x509.AlgorithmIdentifier prf)
prf - algorithm id for PRF.
java.lang.IllegalStateException - if this builder was intialised with a PBKDFDefpublic JcePKCSPBEOutputEncryptorBuilder setIterationCount(int iterationCount)
iterationCount - the iteration count to apply to the key creation.
java.lang.IllegalStateException - if this builder was intialised with a PBKDFDef
public OutputEncryptor build(char[] password)
throws OperatorCreationException
OutputEncryptor. Its
algorithm identifier carries the freshly generated salt / iteration count / IV in the
wire format appropriate to the chosen scheme.
password - the password used to derive the encryption key.
OperatorCreationException - if a JCE Cipher or SecretKeyFactory
cannot be created for the requested scheme.
|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||