PassportChipData

public struct PassportChipData : Codable

Contains files read from an integrated chip on an ePassport

Note

Data Groups 3 and 4 (fingerprint & iris data) are omitted. These groups contain highly sensitive data, and many countries protect these groups with Extended Access Control (EAC) which requires explicit authorization from the issuing government authority.

Important

PassportChipData contains sensitive PII and verified document data. Be wary of local laws and restrictions when storing or transmitting this information.

  • Contains the Machine-Readable Zone (mandatory)

    Declaration

    Swift

    public let dataGroup1: DataGroup1
  • Contains the full-color, full-resolution headshot image & metadata (optional)

    Declaration

    Swift

    public let dataGroup2: DataGroup2?
  • Contains a grayscale headshot image meant for laser-engraving (optional)

    Declaration

    Swift

    public let dataGroup5: DataGroup5?
  • Unused / reserved for future use

    Declaration

    Swift

    public let dataGroup6: DataGroup6?
  • Contains an image of the holder’s signature (optional)

    Declaration

    Swift

    public let dataGroup7: DataGroup7?
  • Not yet defined, but used for temporary proprietary features (optional)

    Declaration

    Swift

    public let dataGroup8: DataGroup8?
  • Not yet defined, but used for temporary proprietary features (optional)

    Declaration

    Swift

    public let dataGroup9: DataGroup9?
  • Not yet defined, but used for temporary proprietary features (optional)

    Declaration

    Swift

    public let dataGroup10: DataGroup10?
  • Contains additional personal information (optional)

    Declaration

    Swift

    public let dataGroup11: DataGroup11?
  • Contains additional information about the document (optional)

    Declaration

    Swift

    public let dataGroup12: DataGroup12?
  • Contains issuer-specific details (optional)

    Declaration

    Swift

    public let dataGroup13: DataGroup13?
  • Contains security information to support Chip Authentication and/or PACE-GM/-IM, if either are supported (conditional)

    Declaration

    Swift

    public let dataGroup14: DataGroup14?
  • Contains public key info for Active Authentication, if supported (conditional)

    Declaration

    Swift

    public let dataGroup15: DataGroup15?
  • Contains a list of persons to notify in case of emergencies (optional)

    Declaration

    Swift

    public let dataGroup16: DataGroup16?
  • Contains cryptographic data used to verify passport integrity and authenticity

    Declaration

    Swift

    public let documentSecurityObject: DocumentSecurityObject
  • If true, then one or more data groups did not pass hash validation

    Declaration

    Swift

    public let haveDataGroupsBeenTamperedWith: Bool
  • If true, then the Document Signer Certificate has been successfully built in a trust chain against a trusted CSCA within the PassportChipReader.cscaMasterListURL, if provided

    Declaration

    Swift

    public let isDocumentSignerCertificateVerifiedAgainstCSCA: Bool
  • If true, then the reader has verified that the passport data is consistent with the international standard & the data has been proven to be unmodified.

    Declaration

    Swift

    public var didPassIntegrityCheck: Bool { get }
  • If true, then the passport has been verified as issued by a trusted authority

    Important

    This will only be true if a PassportChipReader.cscaMasterListURL is provided, and the Master List contains the CSCA Certificate that issued the DSC for the current passport.

    Warning

    Verification against a CRL (Certificate Revocation List) is not currently implemented. It is possible that the passport is verified as authentic, but the DSC has been revoked by the issuing authority.

    Declaration

    Swift

    public var didPassAuthenticityCheck: Bool { get }
  • Embeds the chip data into an image, typically from the Document Scan SDK.

    Use this function to prepare captured passport images for submission to the CatfishAir API.

    Example:

    func prepareImagesForUpload(result: DSResult, chipData: PassportChipData) {
        let imageData = chipData.embeddedIn(image: result.image)
        let flashImageData = chipData.embeddedIn(image: result.flashImage)
        // Proceed to upload
    }
    

    Warning

    The internal behavior of this function may change over time. To ensure compatibility and security, we don’t suggest implementing this outside of the NFC Reader SDK.

    Declaration

    Swift

    public func embeddedIn(image: Data?) -> Data?

    Parameters

    image

    The image data where chip data should be embedded

    Return Value

    A new image with embedded chip data