Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cryptography/hazmat/primitives/twofactor/__pycache__/totp.cpython-39.pyc
Ðазад
a p�h� � @ sH d dl Z d dlmZ d dlmZ d dlmZmZmZ G dd� de �Z dS )� N)� constant_time)�InvalidToken)�HOTP�_ALLOWED_HASH_TYPES� _generate_uric @ sl e Zd Zdeeeeejed�dd�Z ej eef ed�dd�Zeedd �d d�Z eeje ed�d d�ZdS )�TOTPNT)�key�length� algorithm� time_step�backend�enforce_key_lengthc C s || _ t||||d�| _d S )N)r )� _time_stepr �_hotp)�selfr r r r r r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cryptography/hazmat/primitives/twofactor/totp.py�__init__ s �z TOTP.__init__)�time�returnc C s t || j �}| j�|�S )N)�intr r �generate)r r �counterr r r r s z TOTP.generate)�totpr r c C s t �| �|�|�std��d S )Nz#Supplied TOTP value does not match.)r Zbytes_eqr r )r r r r r r �verify# s zTOTP.verify)�account_name�issuerr c C s t | jd||dt| j�fg�S )Nr Zperiod)r r r r )r r r r r r �get_provisioning_uri'