Registry / auth-security / authencoding

authencoding

JSON →
library6.0pypypi✓ verified 83d ago

Framework for handling LDAP-style password hashes in Python. Current version 6.0, compatible with Python >=3.9. Release cadence is irregular, driven by Zope project needs.

pip install authencoding
INSTALL
IMPORT
SIG · AUTHENCODING
A
authencoding
auth-securitypythonv6.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.0 · pip install
no network on importno background threads
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.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

AuthEncoding
from AuthEncoding import AuthEncoding
from authencoding import encode_password
pw_encrypt
from AuthEncoding import pw_encrypt
pw_validate
from AuthEncoding import pw_validate

Encode and validate a password using the default SHA256 scheme.

from authencoding import encode_password, validate_password password = "secret123" # Encode with default scheme (SHA256) encoded = encode_password(password) try: is_valid = validate_password(password, encoded) print(f"Valid: {is_valid}") except ValueError as e: print(f"Error: {e}")
Debug
Known issues
breakingv6 removed support for legacy LM/NT hash schemes, dropping the `lmhash` and `nthash` parameters from encoding functions. Code using `encode_password(pw, lmhash='...')` will fail.
fix
Update calls to only pass the password string; remove legacy hash arguments.
affects: <=5.0 -> >=6.0
breakingIn v6, `validate_password` (formerly `check_password`) now raises `ValueError` for unsupported or malformed hashes instead of returning `False`. Code assuming `False` return on error will break.
fix
Wrap calls in try/except ValueError or use the new `verify_password` (if available) that returns boolean.
affects: <=5.0 -> >=6.0
deprecatedThe `authencoding.utils` module is deprecated. Direct imports like `from authencoding.utils import validate_password` will be removed in a future release.
fix
Import directly from `authencoding` instead.
affects: >=6.0
gotchaPassword encoding with the default scheme uses SHA256 with a prefix '{SHA256}'. If you need SHA1 (SSHA) or MD5, you must specify the scheme explicitly. Do not assume plain-text storage.
fix
Use `encode_password(pw, scheme='{SSHA}')` for SHA1 or `scheme='{SMD5}'` for MD5.
affects: all
Upgrade
Version history
6.0latest on PyPI · released Feb 26, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources
authencoding — pip install authencoding · libregistry