MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/cwd/proc/2/root/proc/2/task/2/root/usr/lib/python2.4/hmac.pyc
mò
‚=5Dc@sAdZd„ZdZgZdfd„ƒYZddd„ZdS(sxHMAC (Keyed-Hashing for Message Authentication) Python module.

Implements the HMAC algorithm as described by RFC 2104.
cCsditd„||ƒƒS(sKUtility method. XOR the two strings s1 and s2 (must have same length).
    tcCstt|ƒt|ƒAƒS(N(tchrtordtxty(RR((t/usr/lib/python2.4/hmac.pyt<lambda>	sN(tjointmapts1ts2(R	R
((Rt_strxorstHMACcBsAtZdZeed„Zd„Zd„Zd„Zd„ZRS(s_RFC2104 HMAC class.

    This supports the API for Cryptographic Hash Functions (PEP 247).
    cCs |tjodSn|djodk}|}n||_|iƒ|_|iƒ|_|i	|_	d}d|}d|}t
|ƒ|jo|i|ƒiƒ}n|tdƒ|t
|ƒ}|iit||ƒƒ|iit||ƒƒ|dj	o|i|ƒndS(sŬ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.
        Ni@t6s\i(tkeyt_secret_backdoor_keyt	digestmodtNonetmd5tselftnewtoutertinnertdigest_sizet	blocksizetipadtopadtlentdigestRtupdateRtmsg(RRRRRRRR((Rt__init__s(

	
	


cCs|ii|ƒdS(s8Update this hashing object with the string msg.
        N(RRRR(RR((RR>scCsLttƒ}|i|_|i|_|iiƒ|_|iiƒ|_|S(syReturn a separate copy of this hashing object.

        An update to this copy won't affect the original object.
        N(	RRtotherRRRRtcopyR(RR ((RR!CscCs/|iiƒ}|i|iiƒƒ|iƒS(sö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.
        N(RRR!thRRR(RR"((RROscCsMdig}t|iƒƒD]&}|tt|ƒƒdidƒq~ƒS(sKLike digest(), but returns a string of hexadecimal digits instead.
        RiN(	Rt_[1]ttupleRRRthexRtzfill(RR#R((Rt	hexdigestZs(	t__name__t
__module__t__doc__RRRR!RR'(((RRs$			cCst|||ƒS(sVCreate 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.
    N(RRRR(RRR((RR`s
N(R*RRRRRR(RRRRR((Rt?s
	L