neg static method

List<int> neg(
  1. List<int> scalar
)

Negates a scalar.

Implementation

static List<int> neg(List<int> scalar) {
  final out = List<int>.filled(32, 0);
  CryptoOps.scMulAdd(
    out,
    CryptoOpsConst.scMinusOne,
    scalar,
    CryptoOpsConst.zero,
  );
  return out.asBytes;
}