Class JcePBESecretKeyEncryptorBuilder
java.lang.Object
org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder
-
Constructor Summary
ConstructorDescriptionJcePBESecretKeyEncryptorBuilder
(int encAlgorithm) JcePBESecretKeyEncryptorBuilder
(int encAlgorithm, int s2kCount) Create a SecretKeyEncryptorBuilder with the S2K count different to the default of 0x60.JcePBESecretKeyEncryptorBuilder
(int encAlgorithm, PGPDigestCalculator s2kDigestCalculator) Create a builder which will make encryptors using the passed in digest calculator.JcePBESecretKeyEncryptorBuilder
(int encAlgorithm, PGPDigestCalculator s2kDigestCalculator, int s2kCount) Create an SecretKeyEncryptorBuilder with the S2k count different to the default of 0x60, and the S2K digest different from SHA-1. -
Method Summary
Modifier and TypeMethodDescriptionbuild
(char[] passPhrase) setProvider
(String providerName) setProvider
(Provider provider) setSecureRandom
(SecureRandom random) Provide a user defined source of randomness.
-
Constructor Details
-
JcePBESecretKeyEncryptorBuilder
public JcePBESecretKeyEncryptorBuilder(int encAlgorithm) -
JcePBESecretKeyEncryptorBuilder
public JcePBESecretKeyEncryptorBuilder(int encAlgorithm, int s2kCount) Create a SecretKeyEncryptorBuilder with the S2K count different to the default of 0x60.- Parameters:
encAlgorithm
- encryption algorithm to use.s2kCount
- iteration count to use for S2K function.
-
JcePBESecretKeyEncryptorBuilder
Create a builder which will make encryptors using the passed in digest calculator. If a MD5 calculator is passed in the builder will assume the encryptors are for use with version 3 keys.- Parameters:
encAlgorithm
- encryption algorithm to use.s2kDigestCalculator
- digest calculator to use.
-
JcePBESecretKeyEncryptorBuilder
public JcePBESecretKeyEncryptorBuilder(int encAlgorithm, PGPDigestCalculator s2kDigestCalculator, int s2kCount) Create an SecretKeyEncryptorBuilder with the S2k count different to the default of 0x60, and the S2K digest different from SHA-1.- Parameters:
encAlgorithm
- encryption algorithm to use.s2kDigestCalculator
- digest calculator to use.s2kCount
- iteration count to use for S2K function.
-
-
Method Details
-
setProvider
-
setProvider
-
setSecureRandom
Provide a user defined source of randomness.- Parameters:
random
- the secure random to be used.- Returns:
- the current builder.
-
build
-