JcePasswordRecipient (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.cms.jcajce

## Class JcePasswordRecipient

- java.lang.Object
- - org.bouncycastle.cms.jcajce.JcePasswordRecipient

- All Implemented Interfaces:
    PasswordRecipient, Recipient
  Direct Known Subclasses:
    JcePasswordAuthenticatedRecipient, JcePasswordEnvelopedRecipient

      public abstract class JcePasswordRecipient
      extends java.lang.Object
      implements PasswordRecipient

  the RecipientInfo class for a recipient who has been sent a message encrypted using a password.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected EnvelopedDataHelper` | `helper`

    - ### Fields inherited from interface org.bouncycastle.cms.PasswordRecipient

      `PKCS5_SCHEME2, PKCS5_SCHEME2_UTF8`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `calculateDerivedKey(int schemeID, org.bouncycastle.asn1.x509.AlgorithmIdentifier derivationAlgorithm, int keySize)`
    `protected java.security.Key` | `extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier contentEncryptionAlgorithm, byte[] derivedKey, byte[] encryptedContentEncryptionKey)`
    `char[]` | `getPassword()`
    `int` | `getPasswordConversionScheme()`
    `JcePasswordRecipient` | `setPasswordConversionScheme(int schemeID)`
    `JcePasswordRecipient` | `setProvider(java.security.Provider provider)`
    `JcePasswordRecipient` | `setProvider(java.lang.String providerName)`

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

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

    - ### Methods inherited from interface org.bouncycastle.cms.PasswordRecipient

      `getRecipientOperator`

- - ### Field Detail

    - #### helper

          protected EnvelopedDataHelper helper

  - ### Method Detail

    - #### setPasswordConversionScheme

          public JcePasswordRecipient setPasswordConversionScheme(int schemeID)

    - #### setProvider

          public JcePasswordRecipient setProvider(java.security.Provider provider)

    - #### setProvider

          public JcePasswordRecipient setProvider(java.lang.String providerName)

    - #### extractSecretKey

          protected java.security.Key extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm,
                                           org.bouncycastle.asn1.x509.AlgorithmIdentifier contentEncryptionAlgorithm,
                                           byte[] derivedKey,
                                           byte[] encryptedContentEncryptionKey)
                                                throws CMSException

      Throws:
        `CMSException`

    - #### calculateDerivedKey

          public byte[] calculateDerivedKey(int schemeID,
                                   org.bouncycastle.asn1.x509.AlgorithmIdentifier derivationAlgorithm,
                                   int keySize)
                                     throws CMSException

      Specified by:
        `calculateDerivedKey` in interface `PasswordRecipient`
      Throws:
        `CMSException`

    - #### getPasswordConversionScheme

          public int getPasswordConversionScheme()

      Specified by:
        `getPasswordConversionScheme` in interface `PasswordRecipient`

    - #### getPassword

          public char[] getPassword()

      Specified by:
        `getPassword` in interface `PasswordRecipient`