HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/passlib/handlers/postgres.pyc
�
�
5Xc@s�dZddlmZddlZeje�ZddlmZddl	m
Z
mZmZddl
jjZdgZdejejfd��YZdS(sXpasslib.handlers.postgres_md5 - MD5-based algorithm used by Postgres for pg_shadow tablei����(tmd5N(tto_bytes(t
str_to_uasciitunicodetutpostgres_md5cBs8eZdZdZed�ZejZdZ	d�Z
RS(s�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.
    RRi cCsSt|t�r!|jd�}nt|jddd�}tt||�j��S(Nsutf-8tparamtuser(t
isinstanceRtencodeRRRRt	hexdigest(tselftsecretR((s=/usr/lib/python2.7/site-packages/passlib/handlers/postgres.pyt_calc_checksum+s(t__name__t
__module__t__doc__tnameRt_hash_prefixtuht	HEX_CHARStchecksum_charst
checksum_sizeR
(((s=/usr/lib/python2.7/site-packages/passlib/handlers/postgres.pyRs
	(RthashlibRtloggingt	getLoggerRtlogt
passlib.utilsRtpasslib.utils.compatRRRtpasslib.utils.handlerstutilsthandlersRt__all__tHasUserContextt
StaticHandlerR(((s=/usr/lib/python2.7/site-packages/passlib/handlers/postgres.pyt<module>s