o
    ÌÉh±  ã                   @   s$   d dl Z d dlmZ dZdd„ ZdS )é    N)ÚUnsupportedOperationi   c              	   C   s˜   d}t | dƒr|  ¡ }z|  d¡ W n ttfy   Y nw t tdƒr+t | tj¡}nt ¡ }	 |  t	¡}|s8n| 
|¡ q0t | dƒrH|  |¡ | ¡ S )zU
    Compute the hash of a file-like object, without loading it all into memory.
    r   ÚtellÚfile_digestTÚseek)Úhasattrr   r   ÚAttributeErrorr   Úhashlibr   Úsha1ÚreadÚHASH_READ_SIZEÚupdateÚ	hexdigest)ÚfilelikeÚfile_posÚhasherÚdata© r   úR/var/www/html/ndineBlogger/venv/lib/python3.10/site-packages/wagtail/utils/file.pyÚhash_filelike   s(   
ÿ


ü

r   )r   Úior   r   r   r   r   r   r   Ú<module>   s    