Module Digest::Instance
In: ext/digest/digest.c

This module provides instance methods for a digest implementation object to calculate message digest values.

Methods

<<   ==   block_length   digest   digest!   digest_length   finish   hexdigest   hexdigest!   inspect   length   new   reset   size   to_s   update  

Public Instance methods

Updates the digest using a given string and returns self.

The update() method and the left-shift operator are overridden by each implementation subclass. (One should be an alias for the other)

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.

Returns the block length of the digest.

This method is overridden by each implementation subclass.

If none is given, returns the resulting hash value of the digest, keeping the digest‘s state.

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

Returns the resulting hash value and resets the digest to the initial state.

Returns the length of the hash value of the digest.

This method should be overridden by each implementation subclass. If not, digest_obj.digest().length() is returned.

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.

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.

Returns the resulting hash value and resets the digest to the initial state.

Creates a printable version of the digest object.

Returns a new, initialized copy of the digest object. Equivalent to digest_obj.clone().reset().

Resets the digest to the initial state and returns self.

This method is overridden by each implementation subclass.

Returns digest_obj.hexdigest().

Updates the digest using a given string and returns self.

The update() method and the left-shift operator are overridden by each implementation subclass. (One should be an alias for the other)

[Validate]

ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.