sub static method

List<int> sub(
  1. List<int> scalar1,
  2. List<int> scalar2
)

Subtracts one scalar value from another and returns the result as a List

This method subtracts scalar2 from scalar1 and stores the result in the out List

Parameters:

  • scalar1: The scalar value to subtract from.
  • scalar2: The scalar value to subtract.

Returns: A List

Implementation

static List<int> sub(List<int> scalar1, List<int> scalar2) {
  final out = List<int>.filled(32, 0);
  CryptoOps.scMulAdd(out, CryptoOpsConst.scMinusOne, scalar2, scalar1);
  return BytesUtils.toBytes(out);
}