gdata.tlslite.utils.hmac | index /usr/lib/python2.7/dist-packages/gdata/tlslite/utils/hmac.py

`HMAC (Keyed-Hashing for Message Authentication) Python module.
Implements the HMAC algorithm as described by RFC 2104.
(This file is modified from the standard library version to do faster
copying)`

Classes

``

HMAC

class HMAC
`` | `RFC2104 HMAC class. This supports the API for Cryptographic Hash Functions (PEP 247).`

Methods defined here:

__init__(self, key, msg=None, digestmod=None)
  `Create a new HMAC object.
  key: key for the keyed hash object.
  msg: Initial input for the hash, if provided.
  digestmod: A module supporting PEP 247. Defaults to the md5 module.`

copy(self)
  `Return a separate copy of this hashing object.
  An update to this copy won't affect the original object.`

digest(self)
  `Return the hash value of this hashing object.
  This returns a string containing 8-bit data. The object is
  not altered in any way by this function; you can continue
  updating the object after calling this function.`

hexdigest(self)
  `Like digest(), but returns a string of hexadecimal digits instead.`

update(self, msg)
  `Update this hashing object with the string msg.`

Functions

``

new(key, msg=None, digestmod=None)
  `Create a new hashing object and return it.
  key: The starting key for the hash.
  msg: if available, will immediately be hashed into the object's starting
  state.
  You can now feed arbitrary strings into the object using its update()
  method, and can ask for the hash value at any time by calling its digest()
  method.`

Data
`` |  | digest_size = None