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

org.bouncycastle.asn1.cms

## Class EncryptedContentInfo

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.cms.EncryptedContentInfo

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class EncryptedContentInfo
      extends ASN1Object

  RFC 5652 EncryptedContentInfo object.

       EncryptedContentInfo ::= SEQUENCE {
           contentType ContentType,
           contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
           encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
       }

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncryptedContentInfo(ASN1ObjectIdentifier contentType, AlgorithmIdentifier contentEncryptionAlgorithm, ASN1OctetString encryptedContent)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AlgorithmIdentifier` | `getContentEncryptionAlgorithm()`
    `ASN1ObjectIdentifier` | `getContentType()`
    `ASN1OctetString` | `getEncryptedContent()`
    `static EncryptedContentInfo` | `getInstance(java.lang.Object obj)` Return an EncryptedContentInfo object from the given object.
    `ASN1Primitive` | `toASN1Primitive()` Produce an object suitable for an ASN1OutputStream.

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object`

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

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

- - ### Constructor Detail

    - #### EncryptedContentInfo

          public EncryptedContentInfo(ASN1ObjectIdentifier contentType,
                              AlgorithmIdentifier contentEncryptionAlgorithm,
                              ASN1OctetString encryptedContent)

  - ### Method Detail

    - #### getInstance

          public static EncryptedContentInfo getInstance(java.lang.Object obj)

      Return an EncryptedContentInfo object from the given object.

      Accepted inputs:

      - null → null
      - `EncryptedContentInfo` object
      - `ASN1Sequence` input formats
      Parameters:
        `obj` - the object we want converted.
      Throws:
        `java.lang.IllegalArgumentException` - if the object cannot be converted.

    - #### getContentType

          public ASN1ObjectIdentifier getContentType()

    - #### getContentEncryptionAlgorithm

          public AlgorithmIdentifier getContentEncryptionAlgorithm()

    - #### getEncryptedContent

          public ASN1OctetString getEncryptedContent()

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Produce an object suitable for an ASN1OutputStream.
      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.