관리-도구
편집 파일: mysql.cpython-39.pyc
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>