The hmac module provides support for HMAC (Keyed-Hashing for Message Authentication). HMAC is a mechanism used for message authentication that is built upon cryptographic hashing functions such as MD5 and SHA-1.
new(key [, msg [, digest]])
Creates a new HMAC object. key is a string containing the starting key for the hash, msg contains initial data to process, and digest is a module that should be used for cryptographic hashing. By default, digest is md5. Normally, the initial key value is determined at random using a cryptographically strong random number generator.
An HMAC object, h, has the following methods:
Adds the string msg to the HMAC object.
Returns the digest of all data processed so far and returns ...