eth-hash


Nameeth-hash JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/ethereum/eth-hash
Summaryeth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3
upload_time2024-03-01 17:32:46
maintainer
docs_urlNone
authorThe Ethereum Foundation
requires_python>=3.8, <4
licenseMIT
keywords ethereum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # eth-hash

[![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84)
[![Build Status](https://circleci.com/gh/ethereum/eth-hash.svg?style=shield)](https://circleci.com/gh/ethereum/eth-hash)
[![PyPI version](https://badge.fury.io/py/eth-hash.svg)](https://badge.fury.io/py/eth-hash)
[![Python versions](https://img.shields.io/pypi/pyversions/eth-hash.svg)](https://pypi.python.org/pypi/eth-hash)
[![Docs build](https://readthedocs.org/projects/eth-hash/badge/?version=latest)](https://eth-hash.readthedocs.io/en/latest/?badge=latest)

The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3

Note: the similarly named [pyethash](https://github.com/ethereum/ethash)
has a completely different use: it generates proofs of work.

This is a low-level library, intended to be used internally by other Ethereum tools.
If you're looking for a convenient hashing tool, check out
[`eth_utils.keccak()`](https://eth-utils.readthedocs.io/en/stable/utilities.html#keccak-bytes-int-bool-text-str-hexstr-str-bytes)
which will be a little friendlier, and provide access to other helpful utilities.

Read more in the [documentation on ReadTheDocs](https://eth-hash.readthedocs.io/). [View the change log](https://eth-hash.readthedocs.io/en/latest/release_notes.html).

## Quickstart

```sh
python -m pip install "eth-hash[pycryptodome]"
```

```py
>>> from eth_hash.auto import keccak
>>> keccak(b'')
b"\xc5\xd2F\x01\x86\xf7#<\x92~}\xb2\xdc\xc7\x03\xc0\xe5\x00\xb6S\xca\x82';{\xfa\xd8\x04]\x85\xa4p"
```

See the [docs](http://eth-hash.readthedocs.io/en/latest/quickstart.html#quickstart)
for more about choosing and installing backends.

## Developer Setup

If you would like to hack on eth-hash, please check out the [Snake Charmers
Tactical Manual](https://github.com/ethereum/snake-charmers-tactical-manual)
for information on how we do:

- Testing
- Pull Requests
- Documentation

We use [pre-commit](https://pre-commit.com/) to maintain consistent code style. Once
installed, it will run automatically with every commit. You can also run it manually
with `make lint`. If you need to make a commit that skips the `pre-commit` checks, you
can do so with `git commit --no-verify`.

### Development Environment Setup

You can set up your dev environment with:

```sh
git clone git@github.com:ethereum/eth-hash.git
cd eth-hash
python -m virtualenv venv
. venv/bin/activate
python -m pip install -e ".[dev]"
pre-commit install
```

### Release setup

To release a new version:

```sh
make release bump=$$VERSION_PART_TO_BUMP$$
```

#### How to bumpversion

The version format for this repo is `{major}.{minor}.{patch}` for stable, and
`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).

To issue the next version in line, specify which part to bump,
like `make release bump=minor` or `make release bump=devnum`. This is typically done from the
master branch, except when releasing a beta (in which case the beta is released from master,
and the previous stable branch is released from said branch).

If you are in a beta version, `make release bump=stage` will switch to a stable.

To issue an unstable version when the current version is stable, specify the
new version explicitly, like `make release bump="--new-version 4.0.0-alpha.1 devnum"`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ethereum/eth-hash",
    "name": "eth-hash",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8, <4",
    "maintainer_email": "",
    "keywords": "ethereum",
    "author": "The Ethereum Foundation",
    "author_email": "snakecharmers@ethereum.org",
    "download_url": "https://files.pythonhosted.org/packages/c6/b6/57c89b91cf2dbb02b3019337f97bf346167d06cd23d3bde43c9fe52cae7e/eth-hash-0.7.0.tar.gz",
    "platform": null,
    "description": "# eth-hash\n\n[![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84)\n[![Build Status](https://circleci.com/gh/ethereum/eth-hash.svg?style=shield)](https://circleci.com/gh/ethereum/eth-hash)\n[![PyPI version](https://badge.fury.io/py/eth-hash.svg)](https://badge.fury.io/py/eth-hash)\n[![Python versions](https://img.shields.io/pypi/pyversions/eth-hash.svg)](https://pypi.python.org/pypi/eth-hash)\n[![Docs build](https://readthedocs.org/projects/eth-hash/badge/?version=latest)](https://eth-hash.readthedocs.io/en/latest/?badge=latest)\n\nThe Ethereum hashing function, keccak256, sometimes (erroneously) called sha3\n\nNote: the similarly named [pyethash](https://github.com/ethereum/ethash)\nhas a completely different use: it generates proofs of work.\n\nThis is a low-level library, intended to be used internally by other Ethereum tools.\nIf you're looking for a convenient hashing tool, check out\n[`eth_utils.keccak()`](https://eth-utils.readthedocs.io/en/stable/utilities.html#keccak-bytes-int-bool-text-str-hexstr-str-bytes)\nwhich will be a little friendlier, and provide access to other helpful utilities.\n\nRead more in the [documentation on ReadTheDocs](https://eth-hash.readthedocs.io/). [View the change log](https://eth-hash.readthedocs.io/en/latest/release_notes.html).\n\n## Quickstart\n\n```sh\npython -m pip install \"eth-hash[pycryptodome]\"\n```\n\n```py\n>>> from eth_hash.auto import keccak\n>>> keccak(b'')\nb\"\\xc5\\xd2F\\x01\\x86\\xf7#<\\x92~}\\xb2\\xdc\\xc7\\x03\\xc0\\xe5\\x00\\xb6S\\xca\\x82';{\\xfa\\xd8\\x04]\\x85\\xa4p\"\n```\n\nSee the [docs](http://eth-hash.readthedocs.io/en/latest/quickstart.html#quickstart)\nfor more about choosing and installing backends.\n\n## Developer Setup\n\nIf you would like to hack on eth-hash, please check out the [Snake Charmers\nTactical Manual](https://github.com/ethereum/snake-charmers-tactical-manual)\nfor information on how we do:\n\n- Testing\n- Pull Requests\n- Documentation\n\nWe use [pre-commit](https://pre-commit.com/) to maintain consistent code style. Once\ninstalled, it will run automatically with every commit. You can also run it manually\nwith `make lint`. If you need to make a commit that skips the `pre-commit` checks, you\ncan do so with `git commit --no-verify`.\n\n### Development Environment Setup\n\nYou can set up your dev environment with:\n\n```sh\ngit clone git@github.com:ethereum/eth-hash.git\ncd eth-hash\npython -m virtualenv venv\n. venv/bin/activate\npython -m pip install -e \".[dev]\"\npre-commit install\n```\n\n### Release setup\n\nTo release a new version:\n\n```sh\nmake release bump=$$VERSION_PART_TO_BUMP$$\n```\n\n#### How to bumpversion\n\nThe version format for this repo is `{major}.{minor}.{patch}` for stable, and\n`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).\n\nTo issue the next version in line, specify which part to bump,\nlike `make release bump=minor` or `make release bump=devnum`. This is typically done from the\nmaster branch, except when releasing a beta (in which case the beta is released from master,\nand the previous stable branch is released from said branch).\n\nIf you are in a beta version, `make release bump=stage` will switch to a stable.\n\nTo issue an unstable version when the current version is stable, specify the\nnew version explicitly, like `make release bump=\"--new-version 4.0.0-alpha.1 devnum\"`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3",
    "version": "0.7.0",
    "project_urls": {
        "Homepage": "https://github.com/ethereum/eth-hash"
    },
    "split_keywords": [
        "ethereum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73f0a35e791bd73fa425838d8d0157754150ded141a94cf30d567dfeb9d57316",
                "md5": "97d6f1f8223d975cf75a00bb1f6e9ff0",
                "sha256": "b8d5a230a2b251f4a291e3164a23a14057c4a6de4b0aa4a16fa4dc9161b57e2f"
            },
            "downloads": -1,
            "filename": "eth_hash-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97d6f1f8223d975cf75a00bb1f6e9ff0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8, <4",
            "size": 8650,
            "upload_time": "2024-03-01T17:32:44",
            "upload_time_iso_8601": "2024-03-01T17:32:44.635463Z",
            "url": "https://files.pythonhosted.org/packages/73/f0/a35e791bd73fa425838d8d0157754150ded141a94cf30d567dfeb9d57316/eth_hash-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6b657c89b91cf2dbb02b3019337f97bf346167d06cd23d3bde43c9fe52cae7e",
                "md5": "66d205b679c2df5ce9b119c6f7bad4e4",
                "sha256": "bacdc705bfd85dadd055ecd35fd1b4f846b671add101427e089a4ca2e8db310a"
            },
            "downloads": -1,
            "filename": "eth-hash-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "66d205b679c2df5ce9b119c6f7bad4e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8, <4",
            "size": 12463,
            "upload_time": "2024-03-01T17:32:46",
            "upload_time_iso_8601": "2024-03-01T17:32:46.443571Z",
            "url": "https://files.pythonhosted.org/packages/c6/b6/57c89b91cf2dbb02b3019337f97bf346167d06cd23d3bde43c9fe52cae7e/eth-hash-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 17:32:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ethereum",
    "github_project": "eth-hash",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "tox": true,
    "lcname": "eth-hash"
}
        
Elapsed time: 0.21548s