This pr adds a new import statement to include the secrets module. It also modifies the UserManagement class to store and retrieve password salts along with hashed passwords. The salted passwords are stored in the users file, and during authentication, the stored salt is used to hash the entered password before comparison.
The changes ensure that passwords are more securely stored by adding a random salt value to each user's password before hashing it. This makes it harder for attackers to crack passwords using precomputed tables or rainbow tables.
This pr adds a new import statement to include the
secrets
module. It also modifies theUserManagement
class to store and retrieve password salts along with hashed passwords. The salted passwords are stored in the users file, and during authentication, the stored salt is used to hash the entered password before comparison.The changes ensure that passwords are more securely stored by adding a random salt value to each user's password before hashing it. This makes it harder for attackers to crack passwords using precomputed tables or rainbow tables.
Closes #18