salt

Salt in PBKDF2 – Python

Salt in PBKDF2 – Python Question: I’m just learning about securing password while developing using MySQL and Python, following this tutorial. It’s my understanding that the userpassword is stored at the database hashed, and the salt is stored along side unencrypted, so that we can grab the hashed password and the salt, and rehash using …

Total answers: 1

Salt and hash a password in Python

Salt and hash a password in Python Question: This code is supposed to hash a password with a salt. The salt and hashed password are being saved in the database. The password itself is not. Given the sensitive nature of the operation, I wanted to make sure everything was kosher. import hashlib import base64 import …

Total answers: 8

Creating a salt in python

Creating a salt in python Question: How would I create a random, 16-character base-62 salt in python? I need it for a protocol and I’m not sure where to start. Thanks. Asked By: pajm || Source Answers: >>> import random >>> ALPHABET = “0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ” >>> chars=[] >>> for i in range(16): chars.append(random.choice(ALPHABET)) >>> “”.join(chars) ‘wE9mg9pu2KSmp5lh’ …

Total answers: 7

Hashing in SHA512 using a salt? – Python

Hashing in SHA512 using a salt? – Python Question: I have been looking through ths hashlib documentation but haven’t found anything talking about using salt when hashing data. Help would be great. Asked By: RadiantHex || Source Answers: Salting isn’t a magical process that the library needs to help you with—it’s just additional data provided …

Total answers: 7