Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/opt/alt/python36/lib64/python3.6/__pycache__/hashlib.cpython-36.pyc

3

� f=%�$@sjdZd&Zee�Zee�Zed'ZiZdd�Zdd�Zd(dd�Z	d)dd�Z
y ddlZe
ZeZ
ejej�ZWnek
r�e	ZeZ
YnXyddlmZWnLek
�r�edd �ed!�D��Zed"d �ed!�D��Zd*d#d�ZYnXydd$lmZWnek
�r
YnXxLeD]DZye
e�e�e<Wn*ek
�rRddlZejd%e�YnX�qW[[[
[	[
[dS)+a3hashlib module - A common interface to many hash functions.

new(name, data=b'', **kwargs) - returns a new hash object implementing the
                                given hash function; initializing the hash
                                using the given binary data.

Named constructor functions are also available, these are faster
than using new(name):

md5(), sha1(), sha224(), sha256(), sha384(), sha512(), blake2b(), blake2s(),
sha3_224, sha3_256, sha3_384, sha3_512, shake_128, and shake_256.

More algorithms may be available on your platform but the above are guaranteed
to exist.  See the algorithms_guaranteed and algorithms_available attributes
to find out what algorithm names can be passed to new().

NOTE: If you want the adler32 or crc32 hash functions they are available in
the zlib module.

Choose your hash function wisely.  Some have known collision weaknesses.
sha384 and sha512 will be slow on 32 bit platforms.

Hash objects have these methods:
 - update(data): Update the hash object with the bytes in data. Repeated calls
                 are equivalent to a single call with the concatenation of all
                 the arguments.
 - digest():     Return the digest of the bytes passed to the update() method
                 so far as a bytes object.
 - hexdigest():  Like digest() except the digest is returned as a string
                 of double length, containing only hexadecimal digits.
 - copy():       Return a copy (clone) of the hash object. This can be used to
                 efficiently compute the digests of datas that share a common
                 initial substring.

For example, to obtain the digest of the byte string 'Nobody inspects the
spammish repetition':

    >>> import hashlib
    >>> m = hashlib.md5()
    >>> m.update(b"Nobody inspects")
    >>> m.update(b" the spammish repetition")
    >>> m.digest()
    b'\xbbd\x9c\x83\xdd\x1e\xa5\xc9\xd9\xde\xc9\xa1\x8d\xf0\xff\xe9'

More condensed:

    >>> hashlib.sha224(b"Nobody inspects the spammish repetition").hexdigest()
    'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2'

�md5�sha1�sha224�sha256�sha384�sha512�blake2b�blake2s�sha3_224�sha3_256�sha3_384�sha3_512�	shake_128�	shake_256�new�algorithms_guaranteed�algorithms_available�pbkdf2_hmacc	
Cs�t}|j|�}|dk	r|S�y2|dkrDddl}|j|d<|d<�n|dkrjddl}|j|d<|d<�n�|dkr�ddl}|j|d<|d	<|j|d<|d<n�|dkr�ddl	}|j
|d<|d
<|j|d
<|d<nv|dk�r�ddl}|j
|d<|j|d<nN|dk�rLddl}|j|d<|j|d<|j|d<|j|d<|j|d<|j|d<Wntk
�rdYnX|j|�}|dk	�r~|Std|��dS)N�SHA1r��MD5r�SHA256r�SHA224r�SHA512r�SHA384rrrr	r
rrr
rzunsupported hash type )rr)rr)rrrr)rrrr)rr>r
rrr	rr
)�__builtin_constructor_cache�get�_sha1r�_md5r�_sha256rr�_sha512rr�_blake2rr�_sha3r	r
rrr
r�ImportError�
ValueError)	�name�cache�constructorrrrrr r!�r'�,/opt/alt/python36/lib64/python3.6/hashlib.py�__get_builtin_constructorIsL









r)cCsJ|dkrt|�Syttd|�}|�|Sttfk
rDt|�SXdS)NrrZopenssl_>rr)r)�getattr�_hashlib�AttributeErrorr#)r$�fr'r'r(�__get_openssl_constructortsr.�cKst|�|f|�S)z�new(name, data=b'', **kwargs) - Return a new hashing object using the
    named algorithm; optionally initialized with data (which must be
    a bytes-like object).
    )r))r$�data�kwargsr'r'r(�__py_new�sr2cKsF|dkrt|�|f|�Sytj||�Stk
r@t|�|�SXdS)z�new(name, data=b'') - Return a new hashing object using the named algorithm;
    optionally initialized with data (which must be a bytes-like object).
    rrN>rr)r)r+rr#)r$r0r1r'r'r(�
__hash_new�sr3rN)rccs|]}|dAVqdS)�\Nr')�.0�xr'r'r(�	<genexpr>�sr7�ccs|]}|dAVqdS)�6Nr')r5r6r'r'r(r7�scCs�t|t�st|��t|ttf�s,tt|��}t|ttf�sFtt|��}t|�}t|�}t|dd�}t|�|kr|t||�j	�}|d|t|�}|j
|jt��|j
|jt
��||fdd�}|dkr�t|��|dkr�|j}|dkr�t|��d}	d}
tj}x|t|	�|k�rv|||
jd	d
��}tj|d
�}
x,t|d�D]}||�}|
||d
�N}
�q8W|
d7}
|	|
j|jd
�7}	�q�W|	d|�S)z�Password based key derivation function 2 (PKCS #5 v2.0)

        This Python implementations based on the hmac module about as fast
        as OpenSSL's PKCS5_PBKDF2_HMAC for short passwords and much faster
        for long passwords.
        Z
block_size�@�cSs0|j�}|j�}|j|�|j|j��|j�S)N)�copy�update�digest)�msg�inner�outerZicpyZocpyr'r'r(�prf�s

zpbkdf2_hmac.<locals>.prf�Nr/�Zbig)�
isinstance�str�	TypeError�bytes�	bytearray�
memoryviewrr*�lenr>r=�	translate�	_trans_36�	_trans_5Cr#Zdigest_size�int�
from_bytes�to_bytes�range)Z	hash_nameZpasswordZsaltZ
iterationsZdklenr@rAZ	blocksizerBZdkeyZlooprP�prevZrkey�ir'r'r(r�sB
	)�scryptzcode for hash %s was not found.)rrrrrrrrr	r
rrr
r)rrrr)r/)r/)N)�__doc__Z__always_supported�setrr�__all__rr)r.r2r3r+rZ
__get_hash�unionZopenssl_md_meth_namesr"rrHrRrNrMrUZ__func_name�globalsr#ZloggingZ	exceptionr'r'r'r(�<module>6sP+


9


Hacked By AnonymousFox1.0, Coded By AnonymousFox