Skip to content

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

instance method

Digest::Instance#hexdigest

digest_obj.hexdigest → string
digest_obj.hexdigest(string) → string

If none is given, returns the resulting hash value of the digest in a hex-encoded form, keeping the digest’s state.

If a string is given, returns the hash value for the given string in a hex-encoded form, resetting the digest to the initial state before and after the process.

See also #hexdigest! #finish #file #inspect also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0