Python implementation of https://github.com/defuse/password-hashing (v1.0)
Project description
# password-hashing-python
[![Build Status](https://travis-ci.org/murrple-1/password-hashing-python.svg?branch=master)](https://travis-ci.org/murrple-1/password-hashing-python) [![Coverage Status](https://coveralls.io/repos/github/murrple-1/password-hashing-python/badge.svg?branch=master)](https://coveralls.io/github/murrple-1/password-hashing-python?branch=master)
Python implementation of https://github.com/defuse/password-hashing (v1.0)
Supports both Python >=v2.7.9 and >=3.4.
Please note, this code has not been scrutinized or peer-reviewed at all - though I’m interested, if anyone wants to look it over.
It is a naive attempt to re-implement PasswordHash.php.
# Installation
pip install password-hashing-python
# Usage
## Creating a hash-string `Python Console >>> import password_hashing >>> _hash = password_hashing.create_hash('your_password') >>> print _hash b'sha1:64000:18:B6oWbvtHvu8qCgoE75wxmvpidRnGzGFt:R1gkPOuVjqIoTulWP1TABS0H' >>> # snip: save `_hash` to a DB `
## Validating the password `Python Console >>> # snip: retrieve `_hash` from DB >>> import password_hashing >>> password_hashing.validate_password('your_password', _hash) True >>> password_hashing.validate_password('wrong_password', _hash) False `
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for password_hashing_python-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b766a5e073b13fa5736e551e99f1aef943e96f98c6fb1969c1e0eada7fb39a |
|
MD5 | 87a85981f5d0e8d5109b609796660f6f |
|
BLAKE2b-256 | 86ce36c3a3adc08c672d880e8d99492d3313969c6ca462fe3be9928e57f1bdf9 |