neg static method
Negates a scalar value and returns the result as a List
This method negates the given scalar
and stores the result in the out
List
Parameters:
- scalar: The scalar value to negate.
Returns: A List
Implementation
static List<int> neg(List<int> scalar) {
final out = List<int>.filled(32, 0);
CryptoOps.scMulAdd(
out, CryptoOpsConst.scMinusOne, scalar, CryptoOpsConst.zero);
return BytesUtils.toBytes(out);
}