Module: JSON::JOSE
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#secure_compare(a, b) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/json/jose.rb', line 35 def secure_compare(a, b) if ActiveSupport::SecurityUtils.respond_to?(:fixed_length_secure_compare) begin ActiveSupport::SecurityUtils.fixed_length_secure_compare(a, b) rescue ArgumentError false end else ActiveSupport::SecurityUtils.secure_compare(a, b) end end |