method

secure_compare

secure_compare(a, b)
private

Constant time string comparison, for variable length strings.

The values are first processed by SHA256, so that we don’t leak length info via timing attacks.