reset

hmac.reset â hmac Instance Public methods Resets the hmac to the initial state and returns self.

update

hmac.update(string) â hmachmac Instance Public methods Updates the hmac using a given string and returns self. <<

&lt;&lt;

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)

==

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.

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.

base64digest!

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

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.

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.

digest!

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

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.