feIsnonzero static method

int feIsnonzero(
  1. FieldElement f
)

Implementation

static int feIsnonzero(FieldElement f) {
  final List<int> s = List<int>.filled(32, 0);
  feTobytes(s, f);
  for (int byte in s) {
    if (byte != 0) {
      return 1; // Found a non-zero byte
    }
  }
  return 0;
}