Based on other answers to this question, I implemented a new approach using bcrypt.
Why use bcrypt
If I understand correctly, the argument for using bcrypt over SHA512 is that bcrypt designed to work slowly. bcrypt also has the ability to configure how slowly you want the first time you generate a hashed password:
Slowing down is desirable because if an attacker gets into a table containing hashed passwords, it will be much harder to trick them.
Implementation
def get_hashed_password(plain_text_password):
Notes
I was able to quite easily install the library on a Linux system using:
pip install py-bcrypt
However, I had more problems installing it on my Windows systems. It looks like a patch is needed. See this question: installing py-bcrypt on win 7 64bit Python
Chris Dutrow May 20 '14 at 19:35 2014-05-20 19:35
source share