module MessageVerifier::Util
Extended Modules
Defined in:
message_verifier/util.crInstance Method Summary
-
#fixed_length_secure_compare(a, b)
Constant time string comparison, for fixed length strings.
-
#secure_compare(a, b)
Constant time string comparison, for variable length strings.
Instance Method Detail
def fixed_length_secure_compare(a, b)
#
Constant time string comparison, for fixed length strings.
The values compared should be of fixed length, such as strings that have already been processed by HMAC. Raises in case of length mismatch.
def secure_compare(a, b)
#
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.