Class JcePBEDataDecryptorFactoryBuilder
- java.lang.Object
-
- org.bouncycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder
-
public class JcePBEDataDecryptorFactoryBuilder extends java.lang.ObjectBuilder forPBEDataDecryptorFactoryinstances that obtain cryptographic primitives using the JCE API.
-
-
Constructor Summary
Constructors Constructor Description JcePBEDataDecryptorFactoryBuilder()Base constructor - assume the required digest calculators can be provided from the same source as the cipher needed.JcePBEDataDecryptorFactoryBuilder(PGPDigestCalculatorProvider calculatorProvider)Base constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PBEDataDecryptorFactorybuild(char[] passPhrase)Construct aPBEDataDecryptorFactoryto use to decrypt PBE encrypted data.JcePBEDataDecryptorFactoryBuildersetProvider(java.lang.String providerName)Set the provider name to use for creating cryptographic primitives in the resulting factory the builder produces.JcePBEDataDecryptorFactoryBuildersetProvider(java.security.Provider provider)Set the provider object to use for creating cryptographic primitives in the resulting factory the builder produces.
-
-
-
Constructor Detail
-
JcePBEDataDecryptorFactoryBuilder
public JcePBEDataDecryptorFactoryBuilder()
Base constructor - assume the required digest calculators can be provided from the same source as the cipher needed.
-
JcePBEDataDecryptorFactoryBuilder
public JcePBEDataDecryptorFactoryBuilder(PGPDigestCalculatorProvider calculatorProvider)
Base constructor.- Parameters:
calculatorProvider- a digest calculator provider to provide calculators to support the key generation calculation required.
-
-
Method Detail
-
setProvider
public JcePBEDataDecryptorFactoryBuilder setProvider(java.security.Provider provider)
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
public JcePBEDataDecryptorFactoryBuilder setProvider(java.lang.String providerName)
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
public PBEDataDecryptorFactory build(char[] passPhrase)
Construct aPBEDataDecryptorFactoryto 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.
-
-