constantTimeEquals static method
Constant time comparison of two byte arrays. Returns true if the arrays are identical.
Implementation
static bool constantTimeEquals(List<int> a, List<int> b) {
if (a.length != b.length) {
return false;
}
var result = 0;
for (var i = 0; i < a.length; i++) {
result |= a[i] ^ b[i];
}
return result == 0;
}