ESSCertIDv2 (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.asn1.ess

## Class ESSCertIDv2

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.ess.ESSCertIDv2

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class ESSCertIDv2
      extends ASN1Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ESSCertIDv2(AlgorithmIdentifier hashAlgorithm, ASN1OctetString certHash, IssuerSerial issuerSerial)`
    `ESSCertIDv2(AlgorithmIdentifier algId, byte[] certHash)`
    `ESSCertIDv2(AlgorithmIdentifier algId, byte[] certHash, IssuerSerial issuerSerial)`
    `ESSCertIDv2(byte[] certHash)`
    `ESSCertIDv2(byte[] certHash, IssuerSerial issuerSerial)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ESSCertIDv2` | `from(ESSCertID essCertID)`
    `byte[]` | `getCertHash()`
    `ASN1OctetString` | `getCertHashObject()`
    `AlgorithmIdentifier` | `getHashAlgorithm()`
    `static ESSCertIDv2` | `getInstance(java.lang.Object o)`
    `IssuerSerial` | `getIssuerSerial()`
    `ASN1Primitive` | `toASN1Primitive()` ESSCertIDv2 ::= SEQUENCE { hashAlgorithm AlgorithmIdentifier DEFAULT {algorithm id-sha256}, certHash Hash, issuerSerial IssuerSerial OPTIONAL } Hash ::= OCTET STRING IssuerSerial ::= SEQUENCE { issuer GeneralNames, serialNumber CertificateSerialNumber }

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

      `encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode`

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

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

- - ### Constructor Detail

    - #### ESSCertIDv2

          public ESSCertIDv2(byte[] certHash)

    - #### ESSCertIDv2

          public ESSCertIDv2(AlgorithmIdentifier algId,
                             byte[] certHash)

    - #### ESSCertIDv2

          public ESSCertIDv2(byte[] certHash,
                             IssuerSerial issuerSerial)

    - #### ESSCertIDv2

          public ESSCertIDv2(AlgorithmIdentifier algId,
                             byte[] certHash,
                             IssuerSerial issuerSerial)

    - #### ESSCertIDv2

          public ESSCertIDv2(AlgorithmIdentifier hashAlgorithm,
                             ASN1OctetString certHash,
                             IssuerSerial issuerSerial)

  - ### Method Detail

    - #### from

          public static ESSCertIDv2 from(ESSCertID essCertID)

    - #### getInstance

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

    - #### getHashAlgorithm

          public AlgorithmIdentifier getHashAlgorithm()

    - #### getCertHashObject

          public ASN1OctetString getCertHashObject()

    - #### getCertHash

          public byte[] getCertHash()

    - #### getIssuerSerial

          public IssuerSerial getIssuerSerial()

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

           ESSCertIDv2 ::=  SEQUENCE {
               hashAlgorithm     AlgorithmIdentifier
                        DEFAULT {algorithm id-sha256},
               certHash          Hash,
               issuerSerial      IssuerSerial OPTIONAL
           }

           Hash ::= OCTET STRING

           IssuerSerial ::= SEQUENCE {
               issuer         GeneralNames,
               serialNumber   CertificateSerialNumber
           }

      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.