Skip to main content

Stupid Algorithm for Password Hashing

Project description

Saph for Python

Saph is the Stupid Algorithm for Password Hashing. This is the Python 3 implementation.

For more information about Saph, go to its specification.

Usage

The saph.Saph class contains the implementation. It may be used as follows:

>>> from saph import Saph
>>> hasher = Saph(memory=16384, iterations=8)
>>> hasher.hash('pepper', 'username', 'password').hex()
'38e48e2b1d4418766568e6212e59abb961b876b2a1f7f269752ed84afe6637c0'
>>> hasher.hash('qepper', 'username', 'password').hex()
'bb4a74eb50bab2e4cd334d93ee85d84f9c91f454ef33a68a484408747f0f391a'
>>> hasher.hash('salt', 'pass').hex()
'e1530ba599f87e4e62560e908f3db833cbefa97dc6cf9100d55df57a3a9e29ad'

The .hash method accepts strings, bytes and bytearrays.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for saph, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size saph-1.0-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size saph-1.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page