charmonium.determ-hash-0.2.2
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | charmonium.determ-hash-0.2.2 |
| نام | charmonium.determ-hash |
| نسخه کتابخانه | 0.2.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Samuel Grayson |
| ایمیل نویسنده | grayson5@illinois.edu |
| آدرس صفحه اصلی | https://github.com/charmoniumQ/charmonium.determ_hash.git |
| آدرس اینترنتی | https://pypi.org/project/charmonium.determ-hash/ |
| مجوز | MIT |
======================
charmonium.determ_hash
======================
.. image: https://img.shields.io/pypi/dm/charmonium.determ_hash
:alt: PyPI Downloads
.. image: https://img.shields.io/pypi/l/charmonium.determ_hash
:alt: PyPI Downloads
.. image: https://img.shields.io/pypi/pyversions/charmonium.determ_hash
:alt: Python versions
.. image: https://img.shields.io/github/stars/charmoniumQ/charmonium.determ_hash?style=social
:alt: GitHub stars
.. image: https://img.shields.io/librariesio/sourcerank/pypi/charmonium.determ_hash
:alt: libraries.io sourcerank
- `PyPI`_
- `GitHub`_
.. _`PyPI`: https://pypi.org/project/charmonium.determ_hash/
.. _`GitHub`: https://github.com/charmoniumQ/charmonium.determ_hash
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
.. |hash| replace:: ``hash``
.. _`hash`: https://docs.python.org/3/library/functions.html?highlight=hash#hash
.. _`Python's CLI options`: https://docs.python.org/3/using/cmdline.html
.. _`xxhash`: https://cyan4973.github.io/xxHash/
نیازمندی
| مقدار | نام |
|---|---|
| >=2.0.2,<3.0.0 | xxhash |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl charmonium.determ-hash-0.2.2:
pip install charmonium.determ-hash-0.2.2.whl
نصب پکیج tar.gz charmonium.determ-hash-0.2.2:
pip install charmonium.determ-hash-0.2.2.tar.gz