§
    HŠtjâ  ã                   ó¨   — d Z ddlmZ ddlZ ej        e¦  «        ZddlmZ ddl	m
Z
mZmZ ddlmc mZ dgZ G d„ dej        ej        ¦  «        ZdS )zXpasslib.handlers.postgres_md5 - MD5-based algorithm used by Postgres for pg_shadow tableé    )Úmd5N)Úto_bytes)Ústr_to_uasciiÚunicodeÚuÚpostgres_md5c                   óD   — e Zd ZdZd Z ed¦  «        Zej        Z	dZ
d„ ZdS )r   aé  This class implements the Postgres MD5 Password hash, and follows the :ref:`password-hash-api`.

    It does a single round of hashing, and relies on the username as the salt.

    The :meth:`~passlib.ifc.PasswordHash.hash`, :meth:`~passlib.ifc.PasswordHash.genhash`, and :meth:`~passlib.ifc.PasswordHash.verify` methods all require the
    following additional contextual keywords:

    :type user: str
    :param user: name of postgres user account this password is associated with.
    r   é    c                 óæ   — t          |t          ¦  «        r|                     d¦  «        }t          | j        dd¬¦  «        }t          t          ||z   ¦  «                             ¦   «         ¦  «        S )Nzutf-8Úuser)Úparam)Ú
isinstancer   Úencoder   r   r   r   Ú	hexdigest)ÚselfÚsecretr   s      úW/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/passlib/handlers/postgres.pyÚ_calc_checksumzpostgres_md5._calc_checksum+   sa   € Ý�f�gÑ&Ô&ð 	,Ø—]’] 7Ñ+Ô+ˆFÝ˜œ	 7°&Ð9Ñ9Ô9ˆÝ�S ¨$¡Ñ/Ô/×9Ò9Ñ;Ô;Ñ<Ô<Ð<ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Únamer   Ú_hash_prefixÚuhÚ	HEX_CHARSÚchecksum_charsÚchecksum_sizer   © r   r   r   r      sM   € € € € € ð	ð 	ð €DØ�1�U‘8”8€LØ”\€NØ€Mð
=ð =ð =ð =ð =r   )r   Úhashlibr   ÚloggingÚ	getLoggerr   ÚlogÚpasslib.utilsr   Úpasslib.utils.compatr   r   r   Úpasslib.utils.handlersÚutilsÚhandlersr   Ú__all__ÚHasUserContextÚStaticHandlerr   r    r   r   ú<module>r-      sÏ   ðØ ^Ð ^ð
 Ð Ð Ð Ð Ð Ø €€€Ð'�gÔ'¨Ñ1Ô1�ð #Ð "Ð "Ð "Ð "Ð "Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ø #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ð #ð ð€ð=ð =ð =ð =ð =�2Ô$ bÔ&6ñ =ô =ð =ð =ð =r   