Your IP : 3.143.7.112


Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/hmac.cpython-33.pyo

�
��fXc@s�dZddlZddlmZedd�ed�D��Zedd�ed�D��Z	dZGdd	�d	�Zddd
d�Z
dS(uxHMAC (Keyed-Hashing for Message Authentication) Python module.

Implements the HMAC algorithm as described by RFC 2104.
iN(u_compare_digestccs|]}|dAVqdS(i\N((u.0ux((u)/opt/alt/python33/lib64/python3.3/hmac.pyu	<genexpr>	su	<genexpr>iccs|]}|dAVqdS(i6N((u.0ux((u)/opt/alt/python33/lib64/python3.3/hmac.pyu	<genexpr>
scBsn|EeZdZdZdZdddd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
d�ZdS(uHMACu~RFC 2104 HMAC class.  Also complies with RFC 4231.

    This supports the API for Cryptographic Hash Functions (PEP 247).
    i@cs�t|t�s+tdt|�j��n�dkrOddl}|j�nt��rg�|_	nd�fdd�|_	|j	�|_
|j	�|_|jj|_t
|jd�r|jj}|dkr(tjd	||jftd
�|j}q(n#tjd|jtd
�|j}t|�|krR|j	|�j�}n|t|t|��}|j
j|jt��|jj|jt��|dk	r�|j|�ndS(ukCreate 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.

        Note: key and msg must be bytes objects.
        ukey: expected bytes, but got %riNscs
�j|�S(N(unew(ud(u	digestmod(u)/opt/alt/python33/lib64/python3.3/hmac.pyu<lambda>/suHMAC.__init__.<locals>.<lambda>u
block_sizeiu:block_size of %d seems too small; using our default of %d.iu<No block_size attribute on given digest object; Assuming %d.(u
isinstanceubytesu	TypeErrorutypeu__name__uNoneuhashlibumd5ucallableudigest_consuouteruinnerudigest_sizeuhasattru
block_sizeu	_warningsuwarnu	blocksizeuRuntimeWarningulenudigestuupdateu	translateutrans_5Cutrans_36(uselfukeyumsgu	digestmoduhashlibu	blocksize((u	digestmodu)/opt/alt/python33/lib64/python3.3/hmac.pyu__init__s:	

	
	u
HMAC.__init__cCs?t|t�s+tdt|�j��n|jj|�dS(u8Update this hashing object with the string msg.
        uexpected bytes, but got %rN(u
isinstanceubytesu	TypeErrorutypeu__name__uinneruupdate(uselfumsg((u)/opt/alt/python33/lib64/python3.3/hmac.pyuupdateKsuHMAC.updatecCsU|jj|j�}|j|_|j|_|jj�|_|jj�|_|S(uyReturn a separate copy of this hashing object.

        An update to this copy won't affect the original object.
        (u	__class__u__new__udigest_consudigest_sizeuinnerucopyuouter(uselfuother((u)/opt/alt/python33/lib64/python3.3/hmac.pyucopyRsu	HMAC.copycCs)|jj�}|j|jj��|S(uwReturn a hash object for the current state.

        To be used only internally with digest() and hexdigest().
        (uouterucopyuupdateuinnerudigest(uselfuh((u)/opt/alt/python33/lib64/python3.3/hmac.pyu_current_su
HMAC._currentcCs|j�}|j�S(u�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.
        (u_currentudigest(uselfuh((u)/opt/alt/python33/lib64/python3.3/hmac.pyudigesthsuHMAC.digestcCs|j�}|j�S(uKLike digest(), but returns a string of hexadecimal digits instead.
        (u_currentu	hexdigest(uselfuh((u)/opt/alt/python33/lib64/python3.3/hmac.pyu	hexdigestrsuHMAC.hexdigestN(u__name__u
__module__u__qualname__u__doc__u	blocksizeuNoneu__init__uupdateucopyu_currentudigestu	hexdigest(u
__locals__((u)/opt/alt/python33/lib64/python3.3/hmac.pyuHMACs2
	
uHMACcCst|||�S(uVCreate 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.
    (uHMAC(ukeyumsgu	digestmod((u)/opt/alt/python33/lib64/python3.3/hmac.pyunewxsunew(u__doc__uwarningsu	_warningsuoperatoru_compare_digestucompare_digestubytesurangeutrans_5Cutrans_36uNoneudigest_sizeuHMACunew(((u)/opt/alt/python33/lib64/python3.3/hmac.pyu<module>sf

?>