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

org.bouncycastle.asn1.cmp

## Class CertOrEncCert

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.cmp.CertOrEncCert

- All Implemented Interfaces:
    ASN1Choice, ASN1Encodable, Encodable

      public class CertOrEncCert
      extends ASN1Object
      implements ASN1Choice

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CertOrEncCert(CMPCertificate certificate)`
    `CertOrEncCert(EncryptedValue encryptedCert)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CMPCertificate` | `getCertificate()`
    `EncryptedValue` | `getEncryptedCert()`
    `static CertOrEncCert` | `getInstance(java.lang.Object o)`
    `ASN1Primitive` | `toASN1Primitive()` CertOrEncCert ::= CHOICE { certificate [0] CMPCertificate, encryptedCert [1] EncryptedValue }

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

    - #### CertOrEncCert

          public CertOrEncCert(CMPCertificate certificate)

    - #### CertOrEncCert

          public CertOrEncCert(EncryptedValue encryptedCert)

  - ### Method Detail

    - #### getInstance

          public static CertOrEncCert getInstance(java.lang.Object o)

    - #### getCertificate

          public CMPCertificate getCertificate()

    - #### getEncryptedCert

          public EncryptedValue getEncryptedCert()

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

           CertOrEncCert ::= CHOICE {
                                certificate     [0] CMPCertificate,
                                encryptedCert   [1] EncryptedValue
                     }

      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a basic ASN.1 object representation.