File: //var/opt/nydus/ops/mysql/connector/plugins/__pycache__/mysql_native_password.cpython-39.pyc
a
�,�h� � @ sx d Z ddlZddlmZ ddlmZmZmZ ddlm Z ddl
m
Z
dd lmZ er`dd
l
mZ dZG dd� de�ZdS )
z&Native Password Authentication Plugin.� N)�sha1)�
TYPE_CHECKING�Any�Optional� )�InterfaceError)�logger� )�MySQLAuthPlugin)�MySQLSocket�MySQLNativePasswordAuthPluginc @ sn e Zd ZdZeed�dd�Zeed�dd��Zee d�dd ��Z
eeee d
�dd�Z
d
eeed�dd�ZdS )r zBClass implementing the MySQL Native Password authentication plugin)� auth_data�returnc
C s� |st d��| jsdS d}zXt| j�� ��� }t|��� }t|| ��� }dd� t||�D �}tjdg|�R � }W n: tjt fy� } zt d|� ��|�W Y d}~n
d}~0 0 |S )z;Prepares and returns password as native MySQL 4.1+ passwordz"Missing authentication data (seed)� Nc S s g | ]\}}||A �qS � r )�.0�h1�h3r r �`/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/mysql/connector/plugins/mysql_native_password.py�
<listcomp>>