Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 name

On 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.