cryptoOnetimeauthVerify static method

bool cryptoOnetimeauthVerify(
  1. Uint8List h,
  2. Uint8List i,
  3. Uint8List k
)

Implementation

static bool cryptoOnetimeauthVerify(Uint8List h, Uint8List i, Uint8List k) {
  RangeError.checkValueInInterval(h.length, cryptoOnetimeauthBytes,
      cryptoOnetimeauthBytes, 'h', 'Invalid length');
  RangeError.checkValueInInterval(k.length, cryptoOnetimeauthKeybytes,
      cryptoOnetimeauthKeybytes, 'k', 'Invalid length');

  final _h = h.toPointer();
  final _in = i.toPointer();
  final _k = k.toPointer();
  try {
    return _cryptoOnetimeauth.crypto_onetimeauth_verify(
            _h, _in, i.length, _k) ==
        0;
  } finally {
    calloc.free(_h);
    calloc.free(_in);
    calloc.free(_k);
  }
}