Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edmartt/password-hasher
A script that make use of passlib library for hashing strings
https://github.com/edmartt/password-hasher
hashing mysql mysql-database password-hash password-safety pbkdf2 python python-script python3
Last synced: about 1 month ago
JSON representation
A script that make use of passlib library for hashing strings
- Host: GitHub
- URL: https://github.com/edmartt/password-hasher
- Owner: Edmartt
- Created: 2021-08-07T19:35:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-16T15:00:02.000Z (over 1 year ago)
- Last Synced: 2024-10-02T09:14:18.716Z (about 2 months ago)
- Topics: hashing, mysql, mysql-database, password-hash, password-safety, pbkdf2, python, python-script, python3
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PASSWORD HASHER
A script that ask the user for an input and use the hash function from passlib library. The main purpose of this project is to use a more secure way of storing users data like passwords in databases.
## Install
after clonning, follow this instructions:
On Windows:
$ python -m venv name of the virtualenv
$ env\Scripts\activate
$ pip install requirements.txt
$ set DB_HOST=your localhost
$ set DB_USER=your MySQL/MariaDB user
$ set DB_PASSWORD=your MySQL/MariaDB password
$ set DB_NAME= your database nameOn Linux:
$ python -m venv name of the virtualenv
$ . env\Scripts\activate
$ pip install requirements.txt
$ export DB_HOST=your localhost
$ export DB_USER=your MySQL/MariaDB user
$ export DB_PASSWORD=your MySQL/MariaDB password
$ export DB_NAME= your database name## Running
On Windows:
$ python main.py
On Linux:
$ python3 main.py
Example of use:
$ python(3) main.py
$ Type your plaintext password (it won't be echoed):$ Your hashed password: $pbkdf2-sha256$29000$4pwzppRyTkmpdQ4hhJBSig$Yg/yq9VWkrN5NF6phWiN336r.GnwdoGqSkzsOjS8xmo
$ Password stored in database
## Testing
Coverage:
$ coverage run --source=hashing,password.py -m unittest
### Note
- The name **passwords** is needed for the table used in the database.