From b3f472e33513b3c251affb120db7945a77f05adf Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Thu, 30 Jun 2016 13:07:28 -0400 Subject: Use checkpw() instead of == (#86) --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.rst') diff --git a/README.rst b/README.rst index b8c75a9..3859bb8 100644 --- a/README.rst +++ b/README.rst @@ -105,7 +105,7 @@ the work factor merely pass the desired number of rounds to >>> hashed = bcrypt.hashpw(password, bcrypt.gensalt(14)) >>> # Check that a unhashed password matches one that has previously been >>> # hashed - >>> if bcrypt.hashpw(password, hashed) == hashed: + >>> if bcrypt.checkpw(password, hashed): ... print("It Matches!") ... else: ... print("It Does not Match :(") -- cgit v1.2.1