File manager - Edit - /usr/lib/python3/dist-packages/cryptography/hazmat/primitives/kdf/__pycache__/kbkdf.cpython-310.pyc
Back
o g�eA � @ s� d dl Z d dlmZ d dlmZmZmZmZ d dlm Z d dl mZ d dlm Z mZmZ d dlmZ G dd � d ej�ZG d d� dej�ZG dd � d e�ZdS )� N)�utils)�AlreadyFinalized� InvalidKey�UnsupportedAlgorithm�_Reasons)�_get_backend)�HMACBackend)� constant_time�hashes�hmac)�KeyDerivationFunctionc @ s e Zd ZdZdS )�Mode�ctrN)�__name__� __module__�__qualname__�CounterMode� r r �J/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/kdf/kbkdf.pyr s r c @ s e Zd ZdZdZdS )�CounterLocation�before_fixed�after_fixedN)r r r �BeforeFixed� AfterFixedr r r r r s r c @ s� e Zd Z ddejdedededeje de deje d eje d eje fdd�Zd edefdd�Z de de fdd�Zde fdd�Zde de ddfdd�ZdS )� KBKDFHMACN� algorithm�mode�length�rlen�llen�location�label�context�fixedc C sF t | �} t| t�stdtj��t|tj�stdtj��| � |�s&tdtj��t|t �s/td��t|t�s8td��|s<|rB| rBt d��|d u sK| �|�sOt d��|d u r[| d u r[t d��|d urht|t�shtd ��|d u rnd }|d u rtd }t�d|� t�d|� || _|| _|| _|| _|| _|| _|| _|| _| | _d | _| | _d S )Nz.Backend object does not implement HMACBackend.z5Algorithm supplied is not a supported hash algorithm.z5Algorithm supplied is not a supported hmac algorithm.zmode must be of type Modez(location must be of type CounterLocationz9When supplying fixed data, label and context are ignored.zrlen must be between 1 and 4zPlease specify an llenzllen must be an integer� r! r"