Python: Salted Hash
The salt is just a randomly derived bit of data that you prefix or postfix your data with to dramatically increase the complexity of a dictionary attack on your hashed value. So given a salt
s
and datad
you’d just do the following to generate a salted hash of the data:
import hashlib
hashlib.sha512(s + d).hexdigest()
Via StackOverflow.
Leave a comment