instance method
OpenSSL::HMAC#==
(self other) -> bool
==(other)
ext/openssl/lib/openssl/hmac.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/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.