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

Instance Methods

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.

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

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

In either case, the return value is properly padded with ‘=’ and contains no line feeds.

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

Returns the block length of the digest.

This method is overridden by each implementation subclass.

Returns the resulting hash value in a Bubblebabble encoded form.

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.

Updates the digest with the contents of a given file name and returns self.

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 in a hex-encoded form and resets the digest to the initial state.

Creates a printable version of the digest object.

Returns digest_obj.digest_length().

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.

An alias for length

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)