public class JcePKCSPBEOutputEncryptorBuilder extends Object
Constructor and Description |
---|
JcePKCSPBEOutputEncryptorBuilder(ASN1ObjectIdentifier keyEncryptionAlg) |
JcePKCSPBEOutputEncryptorBuilder(PBKDFConfig pbkdfAlgorithm,
ASN1ObjectIdentifier keyEncryptionAlg)
Constructor allowing different derivation functions such as PBKDF2 and scrypt.
|
Modifier and Type | Method and Description |
---|---|
OutputEncryptor |
build(char[] password) |
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(AlgorithmIdentifier prf)
Set the PRF to use for key generation.
|
JcePKCSPBEOutputEncryptorBuilder |
setProvider(Provider provider) |
JcePKCSPBEOutputEncryptorBuilder |
setProvider(String providerName) |
JcePKCSPBEOutputEncryptorBuilder |
setRandom(SecureRandom random) |
public JcePKCSPBEOutputEncryptorBuilder(ASN1ObjectIdentifier keyEncryptionAlg)
public JcePKCSPBEOutputEncryptorBuilder(PBKDFConfig pbkdfAlgorithm, ASN1ObjectIdentifier keyEncryptionAlg)
pbkdfAlgorithm
- key derivation algorithm definition to use.keyEncryptionAlg
- encryption algorithm to apply the derived key with.public JcePKCSPBEOutputEncryptorBuilder setProvider(Provider provider)
public JcePKCSPBEOutputEncryptorBuilder setProvider(String providerName)
public JcePKCSPBEOutputEncryptorBuilder setRandom(SecureRandom random)
public JcePKCSPBEOutputEncryptorBuilder setKeySizeProvider(SecretKeySizeProvider keySizeProvider)
keySizeProvider
- a provider of integer secret key sizes.public JcePKCSPBEOutputEncryptorBuilder setPRF(AlgorithmIdentifier prf)
prf
- algorithm id for PRF.IllegalStateException
- if this builder was intialised with a PBKDFDefpublic JcePKCSPBEOutputEncryptorBuilder setIterationCount(int iterationCount)
iterationCount
- the iteration count to apply to the key creation.IllegalStateException
- if this builder was intialised with a PBKDFDefpublic OutputEncryptor build(char[] password) throws OperatorCreationException
OperatorCreationException
Copyright © 2020 BouncyCastle.org. All rights reserved.