cryptoBoxOpenEasyAfternm static method
Implementation
static Uint8List cryptoBoxOpenEasyAfternm(
Uint8List c, Uint8List n, Uint8List k) {
RangeError.checkValueInInterval(n.length, cryptoBoxNoncebytes,
cryptoBoxNoncebytes, 'n', 'Invalid length');
RangeError.checkValueInInterval(k.length, cryptoBoxBeforenmbytes,
cryptoBoxBeforenmbytes, 'k', 'Invalid length');
final _m = calloc<Uint8>(c.length - cryptoBoxMacbytes);
final _c = c.toPointer();
final _n = n.toPointer();
final _k = k.toPointer();
try {
_cryptoBox
.crypto_box_open_easy_afternm(_m, _c, c.length, _n, _k)
.mustSucceed('crypto_box_open_easy_afternm');
return _m.toList(c.length - cryptoBoxMacbytes);
} finally {
calloc.free(_m);
calloc.free(_c);
calloc.free(_n);
calloc.free(_k);
}
}