Skip to main content

No project description provided

Project description

This library provides a deterministic hash for Python objects. hash will give different results each process invocation, in order to thwart denial-of-service attacks based on intentionally triggering hash collisions (see -R in Python’s CLI options). Even setting PYTHONHASHSEED is not enough, because the hash can still use non-deterministic data such as pointer-addresses. By default, this package uses the xxhash algorithm, which is the fastest non-cryptographic hash I know of.

>>> from charmonium.determ_hash import determ_hash
>>> determ_hash(b"hello world")
141361478936837800319111455324245712876

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

charmonium.determ_hash-0.2.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

charmonium.determ_hash-0.2.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file charmonium.determ_hash-0.2.2.tar.gz.

File metadata

  • Download URL: charmonium.determ_hash-0.2.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.13.0-30-generic

File hashes

Hashes for charmonium.determ_hash-0.2.2.tar.gz
Algorithm Hash digest
SHA256 81197d7988afde9014feb33d4df36a214e9d40804c448d9b5ee20e4797199c0f
MD5 113a94d63c61faafa61a4bfc3cfe125e
BLAKE2b-256 f4d8f86aa615485ee61d546fe4502371497425d662ef3ebeb85d2741a2258a5b

See more details on using hashes here.

File details

Details for the file charmonium.determ_hash-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for charmonium.determ_hash-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31f739ff3f35d4cec8c81dfb2104b722517856c12fb77a70e08b43395ab67b42
MD5 d48128c8e6b611e6f40a347103a56c31
BLAKE2b-256 538448de975e9abcdb22a294276d2ad25f803700a1e41d5ece0f3b35b7219f7f

See more details on using hashes here.

Supported by

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