constantTimeEquals static method

CryptoStep<Uint8List, bool> constantTimeEquals(
  1. Uint8List expected
)

Compares the current bytes with a defensively retained expected value.

Implementation

static CryptoStep<Uint8List, bool> constantTimeEquals(Uint8List expected) {
  final retained = Uint8List.fromList(expected);
  return _OperationStep(
    'bytes.constantTimeEquals',
    (input) => CryptoBytes.constantTimeEquals(input, retained),
    _ByteEqualsDescriptor(retained),
  );
}