Skip to content

Instantly share code, notes, and snippets.

View yoursamlan's full-sized avatar
🎲
Exploring Bayesian Statistics

Amlan Saha Kundu yoursamlan

🎲
Exploring Bayesian Statistics
View GitHub Profile
@lottspot
lottspot / hashing_passwords.py
Created January 19, 2013 23:40
Scripts for creating and checking hashed/salted passwords in Python
# coding: utf8
"""
Securely hash and check passwords using PBKDF2.
Use random salts to protect againt rainbow tables, many iterations against
brute-force, and constant-time comparaison againt timing attacks.
Keep parameters to the algorithm together with the hash so that we can
change the parameters and keep older hashes working.