hexdigest

digest_obj.hexdigest â stringdigest_obj.hexdigest(string) â string Instance Public methods 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.

file

file(name) Instance Public methods updates the digest with the contents of a given file name and returns self.

digest_length

digest_obj.digest_length â integer Instance Public methods 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.

digest!

digest_obj.digest! â string Instance Public methods Returns the resulting hash value and resets the digest to the initial state.

digest

digest_obj.digest â stringdigest_obj.digest(string) â string Instance Public methods 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.

block_length

digest_obj.block_length â integer Instance Public methods Returns the block length of the digest. This method is overridden by each implementation subclass.

base64digest!

base64digest!() Instance Public methods Returns the resulting hash value and resets the digest to the initial state.

base64digest

base64digest(str = nil) Instance Public methods 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.

==

digest_obj == another_digest_obj â booleandigest_obj == string â boolean Instance Public 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.

<<

digest_obj Instance Public 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)