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

org.bouncycastle.asn1.icao

## Class LDSSecurityObject

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.icao.LDSSecurityObject

- All Implemented Interfaces:
    ASN1Encodable, ICAOObjectIdentifiers, Encodable

      public class LDSSecurityObject
      extends ASN1Object
      implements ICAOObjectIdentifiers

  The LDSSecurityObject object (V1.8).

       LDSSecurityObject ::= SEQUENCE {
         version                LDSSecurityObjectVersion,
         hashAlgorithm          DigestAlgorithmIdentifier,
         dataGroupHashValues    SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
         ldsVersionInfo         LDSVersionInfo OPTIONAL
         -- if present, version MUST be v1 }

       DigestAlgorithmIdentifier ::= AlgorithmIdentifier,

       LDSSecurityObjectVersion :: INTEGER {V0(0)}

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ub_DataGroups`

    - ### Fields inherited from interface org.bouncycastle.asn1.icao.ICAOObjectIdentifiers

      `id_icao, id_icao_aaProtocolObject, id_icao_cscaMasterList, id_icao_cscaMasterListSigningKey, id_icao_documentTypeList, id_icao_extensions, id_icao_extensions_namechangekeyrollover, id_icao_ldsSecurityObject, id_icao_mrtd, id_icao_mrtd_security`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDSSecurityObject(AlgorithmIdentifier digestAlgorithmIdentifier, DataGroupHash[] datagroupHash)`
    `LDSSecurityObject(AlgorithmIdentifier digestAlgorithmIdentifier, DataGroupHash[] datagroupHash, LDSVersionInfo versionInfo)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataGroupHash[]` | `getDatagroupHash()`
    `AlgorithmIdentifier` | `getDigestAlgorithmIdentifier()`
    `static LDSSecurityObject` | `getInstance(java.lang.Object obj)`
    `int` | `getVersion()`
    `LDSVersionInfo` | `getVersionInfo()`
    `ASN1Primitive` | `toASN1Primitive()` Method providing a primitive representation of this object suitable for encoding.

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

- - ### Field Detail

    - #### ub_DataGroups

          public static final int ub_DataGroups

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LDSSecurityObject

          public LDSSecurityObject(AlgorithmIdentifier digestAlgorithmIdentifier,
                                   DataGroupHash[] datagroupHash)

    - #### LDSSecurityObject

          public LDSSecurityObject(AlgorithmIdentifier digestAlgorithmIdentifier,
                                   DataGroupHash[] datagroupHash,
                                   LDSVersionInfo versionInfo)

  - ### Method Detail

    - #### getInstance

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

    - #### getVersion

          public int getVersion()

    - #### getDigestAlgorithmIdentifier

          public AlgorithmIdentifier getDigestAlgorithmIdentifier()

    - #### getDatagroupHash

          public DataGroupHash[] getDatagroupHash()

    - #### getVersionInfo

          public LDSVersionInfo getVersionInfo()

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Description copied from class: `ASN1Object`
      Method providing a primitive representation of this object suitable for encoding.
      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.