tomSecretsConstantTimeEquals function
Whether a equals b, in time independent of where they differ.
Implementation
bool tomSecretsConstantTimeEquals(List<int> a, List<int> b) {
if (a.length != b.length) return false;
var diff = 0;
for (var i = 0; i < a.length; i++) {
diff |= a[i] ^ b[i];
}
return diff == 0;
}