Skip to main content

CosmosHashLib

A simple hashing wrapper with support for salts and peppers

Installation

Use the package manager pip to install CosmosHashLib.

pip install CosmosHashLib

Usage

from CosmosHashLib import hashing

# if no pepper is set
# no attempt will be made to pepper the input

hashing.RandLen(73415123615248374531263482374652358413461324623874189024189236192837189237273452631741)
hashing.Pepper('secret pepper')

# returns string with hash and salts
# in format salt1$hash$salt2
# '9629480548280199683952534504439555097095034673943361626777618263219601140700721613182$df85bca92a6b4b87abda9e621aa5e662113b4fcbb0c022963e43c3b43a230956$4797f1dbb71ac12b5d8985421ed5b743879e1aba11a2beeab9c39b47c96d94fe'
hash = hashing.SHA256.HashSaltPepper('hash a string')

# returns True
hashing.SHA256.VerifySaltPepper('hash a string', hash)

# returns False
hashing.SHA256.VerifySaltPepper('hash some strings', hash)

# Use hashing.SHA1 for SHA1 hashes

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Metadata

Release files for CosmosHashLib 0.0.9

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

Source distribution (sdist)

Source distribution for CosmosHashLib 0.0.9
File Size Uploaded Provenance
CosmosHashLib-0.0.9.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for CosmosHashLib 0.0.9
File Interpreter ABI Platform
CosmosHashLib-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 kB

Release files / CosmosHashLib-0.0.9.tar.gz

Download URL CosmosHashLib-0.0.9.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4c325f46f9417f8f103e7e745f2a6165029559da080f13b010e59e953c98df79
BLAKE2b-256 checksum
How to use checksums
b848fc972899b501c0a64bd6966f532b2f104d362aa5982703aa09aaced0fd58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / CosmosHashLib-0.0.9-py3-none-any.whl

Download URL CosmosHashLib-0.0.9-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a79cc7b0095cf6efe2edfc7198d074c0f45f35dc5b290da71a081356feea46dd
BLAKE2b-256 checksum
How to use checksums
afe4a4ad6cccce9849e3c77f07a5d1e485cd951e70b5414b5594cae04d553345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Security for CosmosHashLib 0.0.9

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.

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