authenticate method

Future<Iso15693Response> authenticate({
  1. required Set<Iso15693RequestFlag> requestFlags,
  2. required int cryptoSuiteIdentifier,
  3. required Uint8List message,
})

Authenticates against the tag (0x35), per ISO/IEC 29167.

cryptoSuiteIdentifier picks the crypto suite, and the suite dictates what message has to contain; both go out untouched. The reply comes back untouched too, in-process replies included, which is what makes the response flag worth reading: Iso15693ResponseFlag.finalResponse is how a finished exchange is told apart from one still waiting for another round.

cryptoSuiteIdentifier is one byte; outside 0-255 it throws PlatformException(code: 'invalidParameter').

Implementation

Future<Iso15693Response> authenticate({
  required Set<Iso15693RequestFlag> requestFlags,
  required int cryptoSuiteIdentifier,
  required Uint8List message,
}) async =>
    _response(await iosApi.iso15693Authenticate(_handle, _flags(requestFlags), cryptoSuiteIdentifier, message));