관리-도구
편집 파일: pbkdf2.cpython-311.pyc
� �܋f� � � � d dl mZ d dlZd dlmZ d dlmZmZmZm Z d dl mZ d dl mZmZ d dlmZ G d� d e� � ZdS ) � )�annotationsN)�utils)�AlreadyFinalized� InvalidKey�UnsupportedAlgorithm�_Reasons)�openssl)� constant_time�hashes)�KeyDerivationFunctionc �* � e Zd Z ddd�Zdd�Zdd�ZdS )� PBKDF2HMACN� algorithm�hashes.HashAlgorithm�length�int�salt�bytes� iterations�backend� typing.Anyc � � ddl m} |� |� � s2t d� |j � � t j � � �d| _ || _ || _ t j d|� � || _ || _ d S )Nr )r z/{} is not supported for PBKDF2 by this backend.Fr )�,cryptography.hazmat.backends.openssl.backendr �pbkdf2_hmac_supportedr �format�namer �UNSUPPORTED_HASH�_used� _algorithm�_lengthr �_check_bytes�_salt�_iterations)�selfr r r r r �ossls �|/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py�__init__zPBKDF2HMAC.__init__ s� � � � � � � � � �)�)�)�4�4� �&�A�H�H��N�� � �)� � � � �� �#������ ��6�4�(�(�(��� �%����� �key_material�returnc � � | j rt d� � �d| _ t j � || j | j | j | j � � S )Nz'PBKDF2 instances can only be used once.T) r r �rust_openssl�kdf�derive_pbkdf2_hmacr r"