method
secure_compare
v5.2.3 -
Show latest stable
- Class:
ActiveSupport::SecurityUtils
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.