Skip to content

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

instance method

Digest::Instance#finish

digest_obj.instance_eval { finish } → digest_obj

Finishes the digest and returns the resulting hash value.

This method is overridden by each implementation subclass and often made private, because some of those subclasses may leave internal data uninitialized. Do not call this method from outside. Use digest!() instead, which ensures that internal data be reset for security reasons.

See also #file #hexdigest #digest_length #hexdigest! also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0