Registry / auth-security / pyescrypt

pyescrypt

JSON →
library0.1.0pypypi✓ verified 87d ago

Python bindings for yescrypt, a memory-hard, NIST-compliant password hashing scheme. Version 0.1.0 is the initial release, supporting all features except shared memory (ROM).

pip install pyescrypt
INSTALL
IMPORT
SIG · PYESCRYPT
P
pyescrypt
auth-securitypythonv0.1.0
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.910 runs
build_error
glibc
py 3.10–3.910 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Yescrypt
✓ from pyescrypt import Yescrypt
✗ from yescrypt import Yescrypt
The package is named pyescrypt, not yescrypt.

Hash and verify a password using yescrypt with default parameters.

from pyescrypt import Yescrypt yescrypt = Yescrypt() password = b"correct horse battery staple" salt = b"unique_salt" hashed = yescrypt.hash(password, salt) print("Hashed:", hashed.hex()) verified = yescrypt.verify(password, salt, hashed) print("Verified:", verified)
Debug
Known issues
gotchaThe hash output is raw bytes (not a string). You are responsible for encoding (e.g., hex) for storage.
fix
Use .hex() on the hash bytes before storing, and .fromhex() when loading.
affects: >=0.1.0
deprecatedThe verify method currently returns True/False. The signature may change in future versions to raise exceptions for invalid input.
fix
Check return value and handle explicitly; watch for updates.
affects: 0.1.0
gotchaNo default parameters for memory cost, block size, or parallelism. You must pass them or accept library defaults that may be weak.
fix
Always specify parameters: hash(password, salt, N=2**14, r=8, p=1) for recommended settings.
affects: >=0.1.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'yescrypt'
Importing using the package name instead of the actual module name.
fix
Use 'from pyescrypt import Yescrypt' (package is pyescrypt).
AttributeError: 'bytes' object has no attribute 'hex'
Python 3.4 or earlier (hex method added in 3.5).
fix
Upgrade to Python 3.5+ or use binascii.hexlify().
cffi.error.CDefError: cannot parse '...'
Missing shared library libyescrypt or incompatible version.
fix
Install libyescrypt from your system package manager (e.g., apt install libyescrypt-dev).
Upgrade
Version history
0.1.0latest on PyPI · released Feb 29, 2024
Audit
Dependencies
cffirequiredC foreign function interface for calling libyescrypt
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
pyescrypt — pip install pyescrypt · libregistry