Class JcePBEDataDecryptorFactoryBuilder
java.lang.Object
org.bouncycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder
Builder for
PBEDataDecryptorFactory
instances that obtain cryptographic primitives using
the JCE API.-
Constructor Summary
ConstructorDescriptionBase constructor - assume the required digest calculators can be provided from the same source as the cipher needed.JcePBEDataDecryptorFactoryBuilder
(PGPDigestCalculatorProvider calculatorProvider) Base constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild
(char[] passPhrase) Construct aPBEDataDecryptorFactory
to use to decrypt PBE encrypted data.setProvider
(String providerName) Set the provider name to use for creating cryptographic primitives in the resulting factory the builder produces.setProvider
(Provider provider) Set the provider object to use for creating cryptographic primitives in the resulting factory the builder produces.
-
Constructor Details
-
JcePBEDataDecryptorFactoryBuilder
public JcePBEDataDecryptorFactoryBuilder()Base constructor - assume the required digest calculators can be provided from the same source as the cipher needed. -
JcePBEDataDecryptorFactoryBuilder
Base constructor.- Parameters:
calculatorProvider
- a digest calculator provider to provide calculators to support the key generation calculation required.
-
-
Method Details
-
setProvider
Set the provider object to use for creating cryptographic primitives in the resulting factory the builder produces.- Parameters:
provider
- provider object for cryptographic primitives.- Returns:
- the current builder.
-
setProvider
Set the provider name to use for creating cryptographic primitives in the resulting factory the builder produces.- Parameters:
providerName
- the name of the provider to reference for cryptographic primitives.- Returns:
- the current builder.
-
build
Construct aPBEDataDecryptorFactory
to use to decrypt PBE encrypted data.- Parameters:
passPhrase
- the pass phrase to use to generate keys in the resulting factory.- Returns:
- a decryptor factory that can be used to generate PBE keys.
-