negate function

void negate(
  1. Uint8List bignum
)

Negate bignum

Implementation

void negate(Uint8List bignum) {
  var carry = 1;
  for (var i = 0; i < bignum.length; ++i) {
    var x = (~bignum[i] & 0xff) + carry;
    bignum[i] = x;
    carry = x >> 8;
  }
}