tassopsaltakis / FilOS

The Friendly Python OS
https://github.com/tassopsaltakis/FilOS/
1 stars 1 forks source link

Added password salting #20

Closed Rijndael1998 closed 7 months ago

Rijndael1998 commented 7 months ago

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.

Closes #18