MrtdApi class
Defines ICAO 9303 MRTD standard API to communicate and send commands to MRTD. TODO: Add ComProvider onConnected notifier and reset _maxRead to _defaultReadLength on new connection
Constructors
- MrtdApi(ComProvider com)
Properties
Methods
-
activeAuthenticate(
Uint8List challenge, {int sigLength = 256}) → Future< Uint8List> -
Sends active authentication command to MRTD with
challenge.challengemust be 8 bytes long. MRTD returns signature of sizesigLengthor of arbitrarily size ifsigLengthis 256. Can throw ICCError ifchallengeis not 8 bytes orsigLengthis wrong signature length. Can throw ComProviderError in case connection with MRTD is lost. -
initSessionViaBAC(
DBAKey keys) → Future< void> -
Initializes Secure Messaging session via BAC protocol using
keys. Can throw ICCError if provided wrong keys. Can throw ComProviderError in case connection with MRTD is lost. -
initSessionViaPACE(
AccessKey accessKey, EfCardAccess efCardAccess) → Future< void> -
Initializes Secure Messaging session via PACE protocol using
keys. Can throw ICCError if provided wrong keys. Can throw ComProviderError in case connection with MRTD is lost. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFile(
int fid) → Future< Uint8List> -
Returns raw EF file bytes of selected DF identified by
fidfrom MRTD. Can throw ICCError in case when file doesn't exist, read errors or SM session is not established but required to read file. Can throw ComProviderError in case connection with MRTD is lost. -
readFileBySFI(
int sfi) → Future< Uint8List> -
Returns raw EF file bytes of selected DF identified by short file identifier
sfidfrom MRTD. Can throw ICCError in case when file doesn't exist, read errors or SM session is not established but required to read file. Can throw ComProviderError in case connection with MRTD is lost. -
selectEMrtdApplication(
) → Future< void> - Selects eMRTD application (DF1) applet. Can throw ICCError if command is sent to invalid MRTD document. Can throw ComProviderError in case connection with MRTD is lost.
-
selectMasterFile(
) → Future< void> - Selects Master File (MF). Can throw ICCError if command is sent to invalid MRTD document. Can throw ComProviderError in case connection with MRTD is lost.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- challengeLen → const int