Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Digest::Instance#==

digest_obj == another_digest_obj → boolean
digest_obj == string → boolean

If a string is given, checks whether it is equal to the hex-encoded hash value of the digest object. If another digest instance is given, checks whether they have the same hash value. Otherwise returns false.

See also #<< #base64digest #base64digest! also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1