| Server IP : 66.29.153.156 / Your IP : 216.73.216.223 Web Server : LiteSpeed System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64 User : lastyfjz ( 1521) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././lib/python3.8/site-packages/pip/_internal/utils/__pycache__/ |
Upload File : |
U
��.e� � @ s� d dl mZ d dlZd dlmZmZmZ d dlmZm Z m
Z
d dlmZ d dl
mZ er�d dlmZmZmZmZmZ d dlmZ er�d d lmZ nd d
lmZ dZddd
gZG dd� de�ZG dd� de�ZdS )� )�absolute_importN)� iteritems�iterkeys�
itervalues)�HashMismatch�HashMissing�InstallationError)�read_chunks)�MYPY_CHECK_RUNNING)�Dict�List�BinaryIO�NoReturn�Iterator)�PY3)�_Hash)�_hashZsha256Zsha384Zsha512c @ s^ e Zd ZdZddd�Zedd� �Zdd� Zd d
� Zdd� Z d
d� Z
dd� Zdd� Zdd� Z
dS )�HasheszaA wrapper that builds multiple hashes at once and checks them against
known-good values
Nc C s |dkri n|| _ dS )zo
:param hashes: A dict of algorithm names pointing to lists of allowed
hex digests
N)�_allowed)�self�hashes� r �>/usr/lib/python3.8/site-packages/pip/_internal/utils/hashes.py�__init__, s zHashes.__init__c C s t dd� | j�� D ��S )Nc s s | ]}t |�V qd S �N)�len)�.0Zdigestsr r r � <genexpr>7 s z&Hashes.digest_count.<locals>.<genexpr>)�sumr �values�r r r r �digest_count4 s zHashes.digest_countc C s || j �|g �kS )z/Return whether the given hex digest is allowed.)r �get)r � hash_nameZ
hex_digestr r r �is_hash_allowed9 s zHashes.is_hash_allowedc
C s� i }t | j�D ]<}zt�|�||<