constantTimeBytesEquality top-level constant

Equality<List<int>> const constantTimeBytesEquality

An implementation of Equality that compares bytes in constant time.

The only deviations from non-constant time are the following special cases:

  • Either argument is null
  • Lengths are non-equal

The implementation of Equality.hash produces a 16-bit hash by using XOR.

Implementation

const Equality<List<int>> constantTimeBytesEquality =
    _ConstantTimeBytesEquality();