HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/mysql/connector/plugins/__pycache__/__init__.cpython-311.pyc
�

�nc���>�dZddlmZddlmZGd�de��ZdS)z!Base Authentication Plugin class.�)�ABC�)�errorsc�8�eZdZdZdZdZ				dd�Zd�Zd	d�ZdS)
�BaseAuthPlugina�Base class for authentication plugins


    Classes inheriting from BaseAuthPlugin should implement the method
    prepare_password(). When instantiating, auth_data argument is
    required. The username, password and database are optional. The
    ssl_enabled argument can be used to tell the plugin whether SSL is
    active or not.

    The method auth_response() method is used to retrieve the password
    which was prepared by prepare_password().
    F�Nc�L�||_||_||_||_||_dS)�InitializationN)�
_auth_data�	_username�	_password�	_database�_ssl_enabled)�self�	auth_data�username�password�database�ssl_enableds      �BD:\Python311\Lib\site-packages\mysql/connector/plugins/__init__.py�__init__zBaseAuthPlugin.__init__5s.��$���!���!���!���'�����c��|jsdS|j}t|t��r|�d��}|dzS)znPrepare and return password as as clear text.

        Returns:
            bytes: Prepared password.
        ��utf8)r
�
isinstance�str�encode)rrs  r�prepare_passwordzBaseAuthPlugin.prepare_passwordDsH���~�	��7��>���h��$�$�	/����v�.�.�H��'�!�!rc�~�|jr#|jstj|j�d����|���S)z�Return the prepared password to send to MySQL.

        Raises:
            InterfaceError: When SSL is required by not enabled.

        Returns:
            str: The prepared password.
        z
 requires SSL)�requires_sslrr�InterfaceError�plugin_namer)rrs  r�
auth_responsezBaseAuthPlugin.auth_responseSsJ����	L�T�%6�	L��'�4�+;�(J�(J�(J�K�K�K��$�$�&�&�&r)NNNF)N)	�__name__�
__module__�__qualname__�__doc__r!r#rrr$�rrrr$so���������L��K�
����

(�
(�
(�
(�
"�
"�
"�'�'�'�'�'�'rrN)r(�abcrrrrr)rr�<module>r+se��:(�'�������������:'�:'�:'�:'�:'�S�:'�:'�:'�:'�:'r