%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/__pycache__/hashlib.cpython-38.pyc

U

na&	@sxdZdZeeZeeZedZiZddddddd	d
hZddZd
dZ	dddZ
d ddZz ddlZeZ
e	ZeejZWnek
re
Z
eZYnXzddlmZWnJek
reddedDZeddedDZd!ddZYnXzddlmZWnek
rYnXeD]DZzeeee<Wn*ek
rbddlZedeYnXq"[[[[
[[	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'

)md5sha1sha224sha256sha384sha512blake2bblake2ssha3_224sha3_256sha3_384sha3_512	shake_128	shake_256)newalgorithms_guaranteedalgorithms_availablepbkdf2_hmacr	r
rrr
rrrc	Cst}||}|dk	r|SzB|dkrDddl}|j|d<|d<n|dkrhddl}|j|d<|d<n|dkrddl}|j|d	<|d
<|j|d<|d<n|d
krddl	}|j
|d<|d<|j|d<|d<n|dkrddl}|j
|d<|j|d<nb|dkr6ddl}|j|d<|j|d<|j|d<|j|d<n&|dkr\ddl}|j|d<|j|d<Wntk
rtYnX||}|dk	r|Std|dS)N>rSHA1rr>MD5rrr>SHA224rSHA256rrrrr>rSHA384SHA512rrrrr>rrrr>rr
r	rr	r
rr>r
rr
rzunsupported hash type )__builtin_constructor_cacheget_sha1r_md5r_sha256rr_sha512rr_blake2rr_sha3r	r
rrr
rImportError
ValueError)	namecacheconstructorrrrrr r!r'#/usr/local/lib/python3.8/hashlib.py__get_builtin_constructorOsN









r)c	CsP|tkrt|Szttd|}||WSttfk
rJt|YSXdS)NZopenssl_)__block_openssl_constructorr)getattr_hashlibAttributeErrorr#)r$fr'r'r(__get_openssl_constructor{sr/cKst||f|S)znew(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$datakwargsr'r'r(__py_newsr4cKsL|tkrt||f|Szt||WStk
rFt||YSXdS)znew(name, data=b'') - Return a new hashing object using the named algorithm;
    optionally initialized with data (which must be a bytes-like object).
    N)r*r)r,rr#r1r'r'r(
__hash_newsr5rN)rccs|]}|dAVqdS)\Nr'.0xr'r'r(	<genexpr>sr:ccs|]}|dAVqdS)6Nr'r7r'r'r(r:scCszt|tst|t|ttfs,tt|}t|ttfsFtt|}t|}t|}t|dd}t||kr|t||	}|d|t|}|
|t|
|t
||fdd}|dkrt||dkr|j}|dkrt|d}	d}
tj}t|	|krn|||
d	d
}t|d
}
t|dD]}||}|
||d
N}
q4|
d7}
|	|
|jd
7}	q|	d|S)zPassword 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.
        
block_size@cSs0|}|}|||||S)N)copyupdatedigest)msginnerouterZicpyZocpyr'r'r(prfs

zpbkdf2_hmac.<locals>.prfNr0big)
isinstancestr	TypeErrorbytes	bytearray
memoryviewrr+lenrBrA	translate	_trans_36	_trans_5Cr#digest_sizeint
from_bytesto_bytesrange)Z	hash_nameZpasswordZsaltZ
iterationsZdklenrDrE	blocksizerFZdkeyZlooprVprevZrkeyir'r'r(rsB
	r)scryptzcode for hash %s was not found.)r0)r0)N)__doc__Z__always_supportedsetrr__all__rr*r)r/r4r5r,rZ
__get_hashunionZopenssl_md_meth_namesr"rrMrXrSrRr\Z__func_nameglobalsr#logging	exceptionr'r'r'r(<module>s\5,


9

Zerion Mini Shell 1.0