{ "info": { "author": "Ville Skytt\u00e4", "author_email": "ville.skytta@iki.fi", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3 :: Only" ], "description": "# hashpipe -- Regular expression match hasher\n\n[![Python versions](https://img.shields.io/pypi/pyversions/hashpipe.svg)](https://pypi.org/project/hashpipe/)\n[![PyPI version](https://badge.fury.io/py/hashpipe.svg)](https://badge.fury.io/py/hashpipe)\n[![Build status](https://travis-ci.org/scop/hashpipe.svg?branch=master)](https://travis-ci.org/scop/hashpipe)\n[![Test coverage](https://codecov.io/gh/scop/hashpipe/branch/master/graph/badge.svg)](https://codecov.io/gh/scop/hashpipe)\n\nhashpipe is a command line tool and a Python library for hashing\nregular expression matches in input data.\n\nMatches are hashed with their HMAC hex digests using a configurable\nkey and digest algorithm, surrounded by angle brackets, and optionally\nprefixed with a configurable string within the brackets.\n\nWhat gets hashed for each match depends on whether the regular\nexpression contains capturing groups. If it doesn't, the entire match\ncontent is hashed. If it does, only content of the first capturing\ngroup is.\n\nThe command line tool operates as a pipe, reading standard input and\noutputting to standard output.\n\n## Examples\n\n### Python\n\n```python3\nimport os\nimport re\n\nfrom hashpipe import Hashpipe\n\nhashpipe = Hashpipe(\n pattern=re.compile(br\"\\bfox|dog\\b\"),\n algorithm=\"sha256\",\n key=os.urandom(128),\n)\nhashed = hashpipe.hash_matches(b\"The quick brown fox jumps over the lazy dog.\")\n# hashed now contains something like:\n# b'The quick brown <00adbe4c178e322e582e4e45c4989a204655c4b3960c0be298bc763e29dc738b> '\n# b'jumps over the lazy .'\n```\n\n### Shell\n\n```\n$ hashpipe --key=deadbeef --algorithm=md5 --prefix='{md5}' '^[^:]+' < /etc/passwd\n<{md5}31572cc0e16e31b00f9888a18310ceab>:x:0:0:root:/root:/bin/bash\n<{md5}1b4fa176c601aadfa5453b9074ba32d8>:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\n...\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scop/hashpipe", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "hashpipe", "package_url": "https://pypi.org/project/hashpipe/", "platform": "", "project_url": "https://pypi.org/project/hashpipe/", "project_urls": { "Homepage": "https://github.com/scop/hashpipe" }, "release_url": "https://pypi.org/project/hashpipe/0.9.1/", "requires_dist": [ "typing ; python_version < \"3.5\"" ], "requires_python": ">=3.3", "summary": "Regular expression match hasher", "version": "0.9.1" }, "last_serial": 4832017, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "258678e98398eec4a00982d40d28addf", "sha256": "c9e2ea87d9058820850d9b340faf44a560b47199f18b375d891cb9e3678c2516" }, "downloads": -1, "filename": "hashpipe-0.9.1-py3-none-any.whl", "has_sig": true, "md5_digest": "258678e98398eec4a00982d40d28addf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.3", "size": 9208, "upload_time": "2019-02-17T17:59:02", "url": "https://files.pythonhosted.org/packages/5b/0f/14e9892a30096df8cfbb5a65bbb6022e6abc84fc419f7a26581bc977d16c/hashpipe-0.9.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e6dff1a83387806f7fac5ce03467eba", "sha256": "137f726d4ec9e73ffb5486d89568dedf9d64800c67563f07ffbcc4ed0875ae80" }, "downloads": -1, "filename": "hashpipe-0.9.1.tar.gz", "has_sig": true, "md5_digest": "4e6dff1a83387806f7fac5ce03467eba", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 8276, "upload_time": "2019-02-17T17:59:04", "url": "https://files.pythonhosted.org/packages/49/7c/8a4255924ee81513bbeabe362316de7ab5915a716c68d162cc062b82b3da/hashpipe-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "258678e98398eec4a00982d40d28addf", "sha256": "c9e2ea87d9058820850d9b340faf44a560b47199f18b375d891cb9e3678c2516" }, "downloads": -1, "filename": "hashpipe-0.9.1-py3-none-any.whl", "has_sig": true, "md5_digest": "258678e98398eec4a00982d40d28addf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.3", "size": 9208, "upload_time": "2019-02-17T17:59:02", "url": "https://files.pythonhosted.org/packages/5b/0f/14e9892a30096df8cfbb5a65bbb6022e6abc84fc419f7a26581bc977d16c/hashpipe-0.9.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e6dff1a83387806f7fac5ce03467eba", "sha256": "137f726d4ec9e73ffb5486d89568dedf9d64800c67563f07ffbcc4ed0875ae80" }, "downloads": -1, "filename": "hashpipe-0.9.1.tar.gz", "has_sig": true, "md5_digest": "4e6dff1a83387806f7fac5ce03467eba", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3", "size": 8276, "upload_time": "2019-02-17T17:59:04", "url": "https://files.pythonhosted.org/packages/49/7c/8a4255924ee81513bbeabe362316de7ab5915a716c68d162cc062b82b3da/hashpipe-0.9.1.tar.gz" } ] }