Current File : //usr/lib/python2.7/site-packages/passlib/handlers/mysql.pyo |
�
�
5Xc @ s� d Z d d l m Z d d l Z d d l Z e j e � Z d d l m Z d d l
m Z d d l m
Z
m Z m Z m Z m Z d d l j j Z d d g Z d e j f d � � YZ d
e j f d � � YZ d S( s8 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
i����( t sha1N( t warn( t
to_native_str( t
bascii_to_strt unicodet ut byte_elem_valuet
str_to_uasciit mysql323t mysq41c B s; e Z d Z d Z d Z e j Z e d � � Z d � Z
RS( s 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.
R i c C s
| j � S( N( t lower( t clst hash( ( s: /usr/lib/python2.7/site-packages/passlib/handlers/mysql.pyt
_norm_hash>