
    >ie	                    r   d dl mZ d dlZd dlZg Z	 d dlZej        dk    rd Ze                    e           n# e	$ r Y nw xY w	 d dl
Z
d Ze                    e           n# e	$ r Y nw xY w	 d dlZd Ze                    e           n# e	$ r Y nw xY wd Ze                    e           d
dZd
d	ZdS )    )annotationsNz0.2.2c                V    t          j        |           }|                    dd          S )zJ
            Produce a 16-bytes hash of *buf* using CityHash.
               little)cityhashCityHash128to_bytes)bufhs     ,lib/python3.11/site-packages/dask/hashing.py_hash_cityhashr      s(     $S))A::b(+++    c                N    t          j        |                                           S )z?
        Produce a 8-bytes hash of *buf* using xxHash.
        )xxhashxxh64digestr
   s    r   _hash_xxhashr   (   s      |C  '')))r   c                *    t          j        |           S )zD
        Produce a 16-bytes hash of *buf* using MurmurHash.
        )mmh3
hash_bytesr   s    r   _hash_murmurhashr   6   s     s###r   c                N    t          j        |                                           S )z6
    Produce a 20-bytes hash of *buf* using SHA1.
    )hashlibsha1r   r   s    r   
_hash_sha1r   ?   s      <##%%%r   c                    |#	  ||           S # t           t          f$ r Y nw xY wt          D ]&}	  ||           c S # t           t          f$ r Y #w xY wt          dt          |                      )z
    Hash a bytes-like (buffer-compatible) object.  This function returns
    a good quality hash but is not cryptographically secure.  The fastest
    available algorithm is selected.  A fixed-length bytes object is returned.
    Nzunsupported type for hashing: )	TypeErrorOverflowErrorhasherstype)r
   hashers     r   hash_bufferr#   I   s     	6#;;=) 	 	 	 D	   	6#;;=) 	 	 	D	
@T#YY@@
A
AAs   
 ##
=AAc                r    t          | |          }t          j        |          }|                                S )zJ
    Same as hash_buffer, but returns its result in hex-encoded form.
    )r#   binasciib2a_hexdecode)r
   r"   r   ss       r   hash_buffer_hexr)   ^   s1     	C  AA88::r   )N)
__future__r   r%   r   r    r   __version__r   appendImportErrorr   r   r   r   r   r#   r)    r   r   <module>r/      s   " " " " " "  
'OOO w&&	, 	, 	, 	~&&&  	 	 	D	"!MMM
* * * NN<      	 	 	D	%KKK
$ $ $ NN#$$$$  	 	 	D	& & & z   B B B B*     s3   : AAA# #A+*A+/B BB