TimingResistantEqual

Timing-attack-resistant comparison. Takes time proportional to length of first argument.

Synopsis

Declared in <util/strencodings.h>

template<typename T>
bool
TimingResistantEqual(
    T const& a,
    T const& b);

Return Value

true if a and b are equal, false otherwise.

Parameters

NameDescription
aThe first sequence to compare.
bThe second sequence to compare.