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