unpad static method
Implementation
static Uint8List unpad(Uint8List buf, int blockSize) {
final _buf = buf.toPointer();
final _unpaddedlen = calloc<Uint32>(1);
try {
_sodium
.sodium_unpad(_unpaddedlen, _buf, buf.length, blockSize)
.mustSucceed('sodium_unpad');
return _buf.toList(_unpaddedlen[0]);
} finally {
calloc.free(_buf);
calloc.free(_unpaddedlen);
}
}