blob: d8ad3ac4f856f6b5126ce6bfccaada7b7b45a3d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
==================================================================
:class:`passlib.hash.plaintext` - Plaintext
==================================================================
.. currentmodule:: passlib.hash
This class stores passwords in plaintext.
This is, of course, ridiculously insecure;
it is provided for backwards compatibility when migrating
existing applications. *It should not be used* for any other purpose.
Usage
=====
This class is mainly useful only for plugging into a :class:`~passlib.context.CryptContext`.
When used, it should always be the last scheme in the list,
as it will recognize all hashes.
It can be used directly as follows::
>>> from passlib.hash import plaintext as pt
>>> #"encrypt" password
>>> pt.encrypt("password")
'password'
>>> nt.identify('password') #check if hash is recognized (all hashes are recognized)
True
>>> nt.verify("password", "password") #verify correct password
True
>>> nt.verify("secret", "password") #verify incorrect password
False
Interface
=========
.. autoclass:: plaintext
|