mac static method

List<BigInt> mac(
  1. BigInt a,
  2. BigInt b,
  3. BigInt c,
  4. BigInt carry,
)

Implementation

static List<BigInt> mac(BigInt a, BigInt b, BigInt c, BigInt carry) {
  final BigInt prod = a + (b * c) + carry;
  assert(prod <= BinaryOps.maxU128);
  final BigInt low = prod.toU64;
  final BigInt high = prod >> 64;
  assert(high <= BinaryOps.maxU64);
  return [low, high];
}