DataGroup2

internal final class DataGroup2 : DataGroup

Represents Data Group 2 (DG2) from an ePassport and it contains biometric data related to the passport holder’s face.

DG2 represents the globally interoperable biometric for machine assisted identity confirmation with machine readable travel documents, which shall be an image of the face of the holder as an input to a face recognition system. If there is more than one recording, the most recent internationally interoperable encoding shall be the first entry.

Note

This Data Group must use the Biometric Information Template (BIT) group template with nested BITs specified in ISO/IEC 7816-11, which allows the possibility to store multiple biometric templates and is in harmony with the CBEFF.

Note

To facilitate interoperability, the first biometric recorded in each Data Group shall be encoded as per ISO/IEC19794-5.

Note

DG2 is required by the LDS of the eMRTD.

  • The number of facial images stored in this data group.

    Declaration

    Swift

    private(set) var numberOfImages: Int { get }
  • The encoding format of the face biometric data.

    Declaration

    Swift

    private(set) var faceBiometricDataEncoding: FaceBiometricDataEncoding? { get }
  • Initializes a DataGroup2 instance with ASN.1 encoded data and a data group identifier.

    Throws

    An error if decoding of the data group fails.

    Declaration

    Swift

    internal required init(_ data: ASN1Node, identifier: DGTag) throws

    Parameters

    data

    The ASN.1 encoded data for the data group.

    identifier

    The identifier of the data group.

  • Decodes the ASN.1 encoded data, extracting and storing the number of face images and the face biometric data encoding.

    Throws

    An error if decoding of the face biometric data fails.

    Declaration

    Swift

    override internal func decode(_ data: ASN1Node) throws

    Parameters

    data

    The ASN.1 encoded data for the data group.