| Server IP : 104.21.25.182 / Your IP : 216.73.217.68 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.9/site-packages/passlib/handlers/__pycache__/ |
Upload File : |
a
f�Wc� � @ s� d Z ddlmZ ddlZddlZe�e�Zddlm Z ddl
mZ ddlm
Z
mZmZmZmZ ddlm mZ ddgZG d d� dej�ZG d
d� dej�ZdS )a8 passlib.handlers.mysql
MySQL 3.2.3 / OLD_PASSWORD()
This implements Mysql's OLD_PASSWORD algorithm, introduced in version 3.2.3, deprecated in version 4.1.
See :mod:`passlib.handlers.mysql_41` for the new algorithm was put in place in version 4.1
This algorithm is known to be very insecure, and should only be used to verify existing password hashes.
http://djangosnippets.org/snippets/1508/
MySQL 4.1.1 / NEW PASSWORD
This implements Mysql new PASSWORD algorithm, introduced in version 4.1.
This function is unsalted, and therefore not very secure against rainbow attacks.
It should only be used when dealing with mysql passwords,
for all other purposes, you should use a salted hash function.
Description taken from http://dev.mysql.com/doc/refman/6.0/en/password-hashing.html
� )�sha1N)�warn)�
to_native_str)�
bascii_to_str�unicode�u�byte_elem_value�
str_to_uascii�mysql323Zmysq41c @ s2 e Zd ZdZd ZdZejZe dd� �Z
dd� ZdS )r
a This class implements the MySQL 3.2.3 password hash, and follows the :ref:`password-hash-api`.
It has no salt and a single fixed round.
The :meth:`~passlib.ifc.PasswordHash.hash` and :meth:`~passlib.ifc.PasswordHash.genconfig` methods accept no optional keywords.
� c C s |� � S �N)�lower��cls�hash� r �:/usr/lib/python3.9/site-packages/passlib/handlers/mysql.py�
_norm_hash>