Skip to main content

A simple hashing wrapper with support for salts and peppers

Project description

CosmosHashLib

A simple hashing wrapper with support for salts and peppers

Installation

Use the package manager pip to install CosmosHashLib.

pip install CosmosHashLib

Usage

import CosmosHashLib

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

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

# returns True or False
CosmosHashLib.SHA256.VerifySaltPepper('hash a string', hash)

# Use CosmosHashLib.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

Project details


Download files

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

Source Distribution

CosmosHashLib-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CosmosHashLib-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file CosmosHashLib-0.0.1.tar.gz.

File metadata

  • Download URL: CosmosHashLib-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for CosmosHashLib-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a406f403ec86c09b9b1f7e204df293e3149f061ff7425b2dad7ed9a2964a2b8f
MD5 928c4d3368d1ad4d1320912df13912f0
BLAKE2b-256 e15357adcc6dd7cf208b4e2b709542cc43a765827140434c64dbc8eb12c831ed

See more details on using hashes here.

File details

Details for the file CosmosHashLib-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: CosmosHashLib-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for CosmosHashLib-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3e591ff37194476f5e0a272f9d40ccfbe11c09757abe35c4872557167b3e819
MD5 9e9f957781fbeaf1d87fc700589493c1
BLAKE2b-256 eba74c27b52687e1f97e93b194d280ba3379a5bb690a329c5dda16363685713a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page