HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/pip/_internal/commands/__pycache__/hash.cpython-311.pyc
�

�mi����ddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZmZddl
mZmZeje��ZGd�de��Zd	ed
edefd�ZdS)
�N)�Values)�Command)�ERROR�SUCCESS)�
FAVORITE_HASH�
STRONG_HASHES)�read_chunks�write_outputc�B�eZdZdZdZdZd
d�Zdedee	de
fd	�ZdS)�HashCommandz�
    Compute a hash of a local package archive.

    These can be used with --hash in a requirements file to do repeatable
    installs.
    z%prog [options] <file> ...T�returnNc
���|j�dddtdtd�d�t�������|j�d|j��dS)	Nz-az--algorithm�	algorithm�storez$The hash algorithm to use: one of {}z, )�dest�choices�action�default�helpr)�cmd_opts�
add_optionrr�format�join�parser�insert_option_group)�selfs �=D:\Python311\Lib\site-packages\pip/_internal/commands/hash.py�add_optionszHashCommand.add_optionssw���
� � ����!��!�7�>�>��	�	�-�(�(���	!�
	
�
	
�
	
�	
��'�'��4�=�9�9�9�9�9��options�argsc
���|s+|j�tj��tS|j}|D]"}t
d||t||�����#tS)Nz%s:
--hash=%s:%s)	r�print_usage�sys�stderrrrr
�
_hash_of_filer)rr r!r�paths     r�runzHashCommand.run'so���	��K�#�#�C�J�/�/�/��L��%�	��	�	�D��#�T�9�m�D�)�6T�6T�
�
�
�
��r)r
N)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvrr�list�str�intr(�rrrrsl��������
)�E���:�:�:�:�
�6�
��c��
�s�
�
�
�
�
�
rrr'rr
c���t|d��5}tj|��}t|��D]}|�|���	ddd��n#1swxYwY|���S)z!Return the hash digest of a file.�rbN)�open�hashlib�newr	�update�	hexdigest)r'r�archive�hash�chunks     rr&r&4s���	
�d�D�	�	��W��{�9�%�%�� ��)�)�	�	�E��K�K������	��������������������>�>���s�<A�A�!A)r6�loggingr$�optparser�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr�pip._internal.utils.hashesrr�pip._internal.utils.miscr	r
�	getLoggerr)�loggerrr0r&r2rr�<module>rEs�����������
�
�
�
�������2�2�2�2�2�2�9�9�9�9�9�9�9�9�C�C�C�C�C�C�C�C�>�>�>�>�>�>�>�>�	��	�8�	$�	$��#�#�#�#�#�'�#�#�#�L�����������r