validatePublicValue static method
Implementation
static BigInt validatePublicValue(BigInt N, BigInt val) {
val = val % N;
// Check that val % N != 0
if (val == BigInt.zero) {
throw Exception('Invalid public value: 0');
}
return val;
}