ACC SHELL
Ñò
oÄMc
@ s¸ d Z d d k Z d i g Z e d ƒ D] Z e e e d Aƒ q) [ ƒ Z d i g Z e d ƒ D] Z e e e d Aƒ qc [ ƒ Z
d Z g Z
d d
d „ ƒ YZ d d d „ Z d S( sx HMAC (Keyed-Hashing for Message Authentication) Python module.
Implements the HMAC algorithm as described by RFC 2104.
iÿÿÿÿNt i i\ i6 t HMACc B sP e Z d Z d Z d d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
RS( s~ RFC 2104 HMAC class. Also complies with RFC 4231.
This supports the API for Cryptographic Hash Functions (PEP 247).
i@ c sµ | t j o d Sˆ d j o d d k } | i ‰ n t ˆ d ƒ o
ˆ | _ n d ‡ f d † | _ | i ƒ | _ | i ƒ | _ | i i | _ t | i d ƒ oJ | i i } | d j o- t
i d | | i f t
d ƒ | i } qn$ t
i d
| i t
d ƒ | i } t | ƒ | j o | i | ƒ i ƒ } n | t d ƒ | t | ƒ } | i i | i t ƒ ƒ | i i | i t ƒ ƒ | d j o | i | ƒ n d S( s9 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. *OR*
A hashlib constructor returning a new hash object.
Defaults to hashlib.md5.
Niÿÿÿÿt __call__R c s
ˆ i | ƒ S( ( t new( t d( t digestmod( s /usr/lib/python2.6/hmac.pyt <lambda>/ s t
block_sizei s: block_size of %d seems too small; using our default of %d.i s<