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

hashCode int
The hash code for this object.
no setterinherited
icc ICC
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activeAuthenticate(Uint8List challenge, {int sigLength = 256}) Future<Uint8List>
Sends active authentication command to MRTD with challenge. challenge must be 8 bytes long. MRTD returns signature of size sigLength or of arbitrarily size if sigLength is 256. Can throw ICCError if challenge is not 8 bytes or sigLength is 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 fid from 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 sfid from 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