
    Lg	                    T   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j                  e       	 	 d dl
Z
d Zej                  e       	 d dlZd Zej                  e       d Zej                  e       d
dZd
d	Zy# e	$ r Y Vw xY w# e	$ r Y Hw xY w# e	$ r Y :w xY w)    )annotationsNz0.2.2c                P    t        j                  |       }|j                  dd      S )zJ
            Produce a 16-bytes hash of *buf* using CityHash.
               little)cityhashCityHash128to_bytes)bufhs     ,lib/python3.12/site-packages/dask/hashing.py_hash_cityhashr      s%     $$S)A::b(++    c                H    t        j                  |       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                H    t        j                  |       j                         S )z6
    Produce a 20-bytes hash of *buf* using SHA1.
    )hashlibsha1r   r   s    r   
_hash_sha1r   ?   s     <<##%%r   c                    |		  ||       S t        D ]  }	  ||       c S  t        dt        |              # t         t        f$ r Y =w xY w# t         t        f$ r Y Lw xY w)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.
    zunsupported type for hashing: )	TypeErrorOverflowErrorhasherstype)r
   hashers     r   hash_bufferr#   I   s     	#;
 	#; 
 4T#YK@
AA =) 	 	 =) 		s    8 AA
	A
AAc                d    t        | |      }t        j                  |      }|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)   ^   s,     	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    "  
' w&	, 	~&!
* NN< %
$ NN#$& z B*[  		&  		  		s4   B	 B B 	BBBBB'&B'