summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-06-29 09:27:21 -0500
committerDonald Stufft <donald@stufft.io>2016-06-29 10:27:21 -0400
commitc9a9ec1e7a39949b1d09d72746fad6a1d681a80b (patch)
tree6726e1973f4c55af714bc9c4c77d76d772d59a7c /README.rst
parent81e8efd0cf48ecf3acfe4c205489c8301ca28045 (diff)
downloadpy-bcrypt-git-c9a9ec1e7a39949b1d09d72746fad6a1d681a80b.tar.gz
Add checkpw (#76)
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/README.rst b/README.rst
index 62f189f..0883286 100644
--- a/README.rst
+++ b/README.rst
@@ -37,6 +37,10 @@ For Fedora and RHEL-derivatives, the following command will ensure that the requ
Changelog
=========
+3.1.0
+-----
+* Added support for ``checkpw`` as another method of verifying a password.
+
3.0.0
-----
* Switched the C backend to code obtained from the OpenBSD project rather than
@@ -51,8 +55,8 @@ Changelog
Usage
-----
-Hashing
-~~~~~~~
+Password Hashing
+~~~~~~~~~~~~~~~~
Hashing and then later checking that a password matches the previous hashed
password is very simple:
@@ -63,9 +67,9 @@ password is very simple:
>>> password = b"super secret password"
>>> # Hash a password for the first time, with a randomly-generated salt
>>> hashed = bcrypt.hashpw(password, bcrypt.gensalt())
- >>> # Check that a unhashed password matches one that has previously been
- >>> # hashed
- >>> if bcrypt.hashpw(password, hashed) == hashed:
+ >>> # Check that an unhashed password matches one that has previously been
+ >>> # hashed
+ >>> if bcrypt.checkpw(password, hashed):
... print("It Matches!")
... else:
... print("It Does not Match :(")