JcePBEDataDecryptorFactoryBuilder
Date: 2016-06-23

org.bouncycastle.openpgp.operator.jcajce

## Class JcePBEDataDecryptorFactoryBuilder

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

-     public class JcePBEDataDecryptorFactoryBuilder
      extends java.lang.Object

  Builder for `PBEDataDecryptorFactory` instances that obtain cryptographic primitives using the JCE API.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JcePBEDataDecryptorFactoryBuilder(PGPDigestCalculatorProvider calculatorProvider)` Base constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PBEDataDecryptorFactory` | `build(char[] passPhrase)` Construct a `PBEDataDecryptorFactory` to use to decrypt PBE encrypted data.
    `JcePBEDataDecryptorFactoryBuilder` | `setProvider(java.security.Provider provider)` Set the provider object to use for creating cryptographic primitives in the resulting factory the builder produces.
    `JcePBEDataDecryptorFactoryBuilder` | `setProvider(java.lang.String providerName)` Set the provider name to use for creating cryptographic primitives in the resulting factory the builder produces.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### 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 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.