AlkantarClanX12
Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/ |
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/hashlib.cpython-35.opt-1.pyc |
��Yf+ � @ s� d Z d Z e e � Z e e � Z e d Z i Z d d � Z d d � Z d d d � Z d d d � Z y. d d l Z e Z e Z e j e j � Z Wn e k r� e Z e Z Yn Xy d d l m Z Wn_ e k r.e d d � e d � D� � Z e d d � e d � D� � Z d d d � Z Yn XxV e D]N Z y e e � e � e <Wq6e k r�d d l Z e j d e � Yq6Xq6W[ [ [ [ [ [ d S)a� hashlib module - A common interface to many hash functions. new(name, data=b'') - 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(), and sha512() 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(arg): Update the hash object with the bytes in arg. 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. - hexdigest(): Like digest() except the digest is returned as a unicode object 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 strings that share a common initial substring. For example, to obtain the digest of the 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�new�algorithms_guaranteed�algorithms_available�pbkdf2_hmacc C sX t } | j | � } | d k r% | Sy� | d k rX d d l } | j | d <| d <n� | d k r� d d l } | j | d <| d <n� | d k r� d d l } | j | d <| d <| j | d <| d <nB | d k rd d l } | j | d <| d <| j | d <| d <Wn t k r$Yn X| j | � } | d k rD| St d | � � d S)N�SHA1r � �MD5r �SHA256r �SHA224r �SHA512r �SHA384r zunsupported hash type )r r )r r )r r r r )r r r r )�__builtin_constructor_cache�get�_sha1r �_md5r �_sha256r r �_sha512r r �ImportError� ValueError)�name�cache�constructorr r r r � r �,/opt/alt/python35/lib64/python3.5/hashlib.py�__get_builtin_constructorD s2 r c C sK y"