Skip to main content

pyphash is a Python extension module that wraps the C library function crypt, which performs passphrase hashing, in the simplest possible fashion. It exposes one function, named crypt, which works just like the C crypt except that it is thread safe:

>>> pyphash.crypt("swordfish", "$5e$z4x3Zlhs")
'$5$z4x3Zlhs$g7JP4M7HZw5L25Xwklbd2nQ2rfjzVGFB1SJutFnmvK4'

You have to create settings strings yourself.

This module is not intended to be used by programs that actually need to hash passphrases—if it were, it would at least also provide access to crypt_gensalt. Rather, its purpose is to be a test case for the packaging toolchain for C extension modules. Linux distributions are changing how they provide the shared library that implements crypt, and Python packaging must adapt. See manylinux bug #305 for the gory details.

For thread safety, the module actually uses the reentrant variant of crypt called crypt_r, and looks for it in crypt.h rather than unistd.h. It will fail to compile if this function or this header is not available.

Metadata

Release files for pyphash 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyphash 0.0.1
File Size Uploaded Provenance Actions
pyphash-0.0.1.tar.gz 7.1 kB Without provenance Details for pyphash-0.0.1.tar.gz

Release files / pyphash-0.0.1.tar.gz

Download URL pyphash-0.0.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cf6ed5a485ad50d2ee2d1cba9f4a3dcaa4d87dce4111e6530272ece5d07b0ae5
BLAKE2b-256 checksum
How to use checksums
80df14338728d4735e279eb4025976b9d0b7892c176e7618ddd6c6c6dc430ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.4

Security for pyphash 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page