File manager - Edit - /usr/local/CyberPanel/lib/python3.10/site-packages/cryptography/hazmat/primitives/kdf/__pycache__/kbkdf.cpython-310.pyc
Back
o �h�# � @ s� d dl mZ d dlZd dlmZ d dlmZmZmZm Z d dl mZmZm Z mZmZ d dlmZ G dd� dej�ZG d d � d ej�ZG dd� d�ZG d d� de�ZG dd� de�ZdS )� )�annotationsN)�utils)�AlreadyFinalized� InvalidKey�UnsupportedAlgorithm�_Reasons)�ciphers�cmac� constant_time�hashes�hmac)�KeyDerivationFunctionc @ s e Zd ZdZdS )�Mode�ctrN)�__name__� __module__�__qualname__�CounterMode� r r �^/usr/local/CyberPanel/lib/python3.10/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.pyr s r c @ s e Zd ZdZdZdZdS )�CounterLocation�before_fixed�after_fixed�middle_fixedN)r r r �BeforeFixed� AfterFixed�MiddleFixedr r r r r s r c @ s8 e Zd Zd dd�Zed!dd��Zd"dd�Zd#dd�ZdS )$� _KBKDFDeriver�prf�typing.Callable�moder �length�int�rlen�llen� int | None�locationr �break_location�label�bytes | None�context�fixedc C s| t |�sJ �t|t�std��t|t�std��|d u r%|tju r%td��|d ur2|tjkr2td��|d ur?t|t�s?td��|d urK|dk rKtd��|sO| rU| rUtd��|d u s^| �|�sbtd ��|d u rn| d u rntd ��|d ur{t|t�s{td��|dkr�td��|d u r�d }| d u r�d } t � d|� t � d| � || _|| _|| _ || _|| _|| _|| _|| _| | _d| _| | _d S )Nzmode must be of type Modez(location must be of type CounterLocationzPlease specify a break_locationzJbreak_location is ignored when location is not CounterLocation.MiddleFixedz!break_location must be an integerr z)break_location must be a positive integerz9When supplying fixed data, label and context are ignored.zrlen must be between 1 and 4zPlease specify an llenzllen must be an integerzllen must be non-zero� r( r* F)�callable� isinstancer � TypeErrorr r � ValueErrorr"