cryptoShorthash static method
Implementation
static Uint8List cryptoShorthash(Uint8List i, Uint8List k) {
RangeError.checkValueInInterval(k.length, cryptoShorthashKeybytes,
cryptoShorthashKeybytes, 'k', 'Invalid length');
final _out = calloc<Uint8>(cryptoShorthashBytes);
final _in = i.toPointer();
final _k = k.toPointer();
try {
_cryptoShorthash
.crypto_shorthash(_out, _in, i.length, _k)
.mustSucceed('crypto_shorthash');
return _out.toList(cryptoShorthashBytes);
} finally {
calloc.free(_out);
calloc.free(_k);
}
}