PasswordRecipientInfoGenerator (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.cms

## Class PasswordRecipientInfoGenerator

- java.lang.Object
- - org.bouncycastle.cms.PasswordRecipientInfoGenerator

- All Implemented Interfaces:
    RecipientInfoGenerator
  Direct Known Subclasses:
    BcPasswordRecipientInfoGenerator, JcePasswordRecipientInfoGenerator

      public abstract class PasswordRecipientInfoGenerator
      extends java.lang.Object
      implements RecipientInfoGenerator

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm, char[] password)`
    `protected` | `PasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm, char[] password, int keySize, int blockSize)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract byte[]` | `calculateDerivedKey(byte[] encodedPassword, org.bouncycastle.asn1.x509.AlgorithmIdentifier derivationAlgorithm, int keySize)`
    `org.bouncycastle.asn1.cms.RecipientInfo` | `generate(GenericKey contentEncryptionKey)`
    `protected abstract byte[]` | `generateEncryptedBytes(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm, byte[] derivedKey, GenericKey contentEncryptionKey)`
    `PasswordRecipientInfoGenerator` | `setPasswordConversionScheme(int schemeID)`
    `PasswordRecipientInfoGenerator` | `setSaltAndIterationCount(byte[] salt, int iterationCount)`
    `PasswordRecipientInfoGenerator` | `setSecureRandom(java.security.SecureRandom random)`

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

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

- - ### Constructor Detail

    - #### PasswordRecipientInfoGenerator

          protected PasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm,
                                        char[] password)

    - #### PasswordRecipientInfoGenerator

          protected PasswordRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier kekAlgorithm,
                                        char[] password,
                                        int keySize,
                                        int blockSize)

  - ### Method Detail

    - #### setPasswordConversionScheme

          public PasswordRecipientInfoGenerator setPasswordConversionScheme(int schemeID)

    - #### setSaltAndIterationCount

          public PasswordRecipientInfoGenerator setSaltAndIterationCount(byte[] salt,
                                                                int iterationCount)

    - #### setSecureRandom

          public PasswordRecipientInfoGenerator setSecureRandom(java.security.SecureRandom random)

    - #### generate

          public org.bouncycastle.asn1.cms.RecipientInfo generate(GenericKey contentEncryptionKey)
                                                           throws CMSException

      Specified by:
        `generate` in interface `RecipientInfoGenerator`
      Throws:
        `CMSException`

    - #### calculateDerivedKey

          protected abstract byte[] calculateDerivedKey(byte[] encodedPassword,
                                   org.bouncycastle.asn1.x509.AlgorithmIdentifier derivationAlgorithm,
                                   int keySize)
                                                 throws CMSException

      Throws:
        `CMSException`

    - #### generateEncryptedBytes

          protected abstract byte[] generateEncryptedBytes(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm,
                                      byte[] derivedKey,
                                      GenericKey contentEncryptionKey)
                                                    throws CMSException

      Throws:
        `CMSException`