Class JcePBEDataDecryptorFactoryBuilder

java.lang.Object
org.bouncycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder

public class JcePBEDataDecryptorFactoryBuilder extends Object
Builder for PBEDataDecryptorFactory instances that obtain cryptographic primitives using the JCE API.
  • Constructor Details

    • 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 Details

    • setProvider

      public JcePBEDataDecryptorFactoryBuilder setProvider(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(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 a PBEDataDecryptorFactory 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.