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. This class should always be the last algorithm checked, as it will recognize all hashes. It can be used directly as follows:
>>> from passlib.hash import plaintext as plaintext >>> # "encrypt" password >>> plaintext.encrypt("password") 'password' >>> # verify password >>> plaintext.verify("password", "password") True >>> plaintext.verify("secret", "password") False
This class stores passwords in plaintext, and follows the Password Hash Interface.
|Parameters:||encoding (str) –
This controls the character encoding to use (defaults to utf-8).
This encoding will be used to encode unicode passwords under Python 2, and decode bytes hashes under Python 3.
Changed in version 1.6: The encoding keyword was added.