End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::HMAC#==
==(other)
ext/openssl/lib/openssl/hmac.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/ext/openssl/lib/openssl/hmac.rb, line 6
def ==(other)
return false unless HMAC === other
return false unless self.digest.bytesize == other.digest.bytesize
OpenSSL.fixed_length_secure_compare(self.digest, other.digest)
end
Securely compare with another HMAC instance in constant time.