read

abstract fun read(tag: Tag, nfcKey: NfcKey): TravelDocument

Read travel document. First it executes appropriate access control method (BAC/PACE). Then it authenticates data and chip, and finally it returns travel document created from read Data Groups. This operation should be called on a background thread.

Return

Travel document data read from Data Groups stored on NFC chip.

Parameters

tag

Travel document NFC tag.

nfcKey

Travel document NFC key to establish access control. It is created from document number, date of birth and date of expiry.

Throws

If both access protocols BAC and PACE fail.

ChipAuthenticationException

If Chip Authentication fails.

If reading fails due to any other reason.