JcePublicKeyKeyEncryptionMethodGenerator
Date: 2016-06-23

org.bouncycastle.openpgp.operator.jcajce

## Class JcePublicKeyKeyEncryptionMethodGenerator

- java.lang.Object
- - org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
  - - org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
    - - org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyKeyEncryptionMethodGenerator

-     public class JcePublicKeyKeyEncryptionMethodGenerator
      extends PublicKeyKeyEncryptionMethodGenerator

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JcePublicKeyKeyEncryptionMethodGenerator(PGPPublicKey key)` Create a public key encryption method generator with the method to be based on the passed in key.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected byte[]` | `encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo)`
    `JcePublicKeyKeyEncryptionMethodGenerator` | `setProvider(java.security.Provider provider)`
    `JcePublicKeyKeyEncryptionMethodGenerator` | `setProvider(java.lang.String providerName)`
    `JcePublicKeyKeyEncryptionMethodGenerator` | `setSecureRandom(java.security.SecureRandom random)` Provide a user defined source of randomness.

    - ### Methods inherited from class org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator

      `generate, processSessionInfo`

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

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

- - ### Constructor Detail

    - #### JcePublicKeyKeyEncryptionMethodGenerator

          public JcePublicKeyKeyEncryptionMethodGenerator(PGPPublicKey key)

      Create a public key encryption method generator with the method to be based on the passed in key.
      Parameters:
        `key` - the public key to use for encryption.

  - ### Method Detail

    - #### setProvider

          public JcePublicKeyKeyEncryptionMethodGenerator setProvider(java.security.Provider provider)

    - #### setProvider

          public JcePublicKeyKeyEncryptionMethodGenerator setProvider(java.lang.String providerName)

    - #### setSecureRandom

          public JcePublicKeyKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)

      Provide a user defined source of randomness.
      Parameters:
        `random` - the secure random to be used.
      Returns:
        the current generator.

    - #### encryptSessionInfo

          protected byte[] encryptSessionInfo(PGPPublicKey pubKey,
                                  byte[] sessionInfo)
                                       throws PGPException

      Specified by:
        `encryptSessionInfo` in class `PublicKeyKeyEncryptionMethodGenerator`
      Throws:
        `PGPException`