{ "info": { "author": "Zachary Voase", "author_email": "zack@meat.io", "bugtrack_url": null, "classifiers": [], "description": "csiphash.py\n===========\n\n`SipHash `__ is a hash function and message\nauthentication code that is secure, fast and simple. It accepts a\n128-bit secret key and a variable-length message, and returns a 64-bit\nhash. It performs better than most cryptographic hash function-based\nMACs (especially for short inputs), and offers much better security than\nnon-cryptographic hash functions, providing resistance against\nhash-flooding DoS attacks. As a result, it is now used as the hash\nfunction of choice for hash tables in Python, Ruby, Rust and Redis.\n\nThis Python package is the SipHash-2-4 `C reference\nimplementation `__, wrapped with\n`CFFI `__. It's incredibly fast: amortized\nhashing times tested as follows on a mid-2015 MacBook Pro:\n\n+----------------+-------------------------------------+\n| Message Size | Time per Hash (Amortized over 1M) |\n+================+=====================================+\n| 43 bytes | 4.89 microseconds |\n+----------------+-------------------------------------+\n| 256 bytes | 5.00 microseconds |\n+----------------+-------------------------------------+\n| 1500 bytes | 6.12 microseconds |\n+----------------+-------------------------------------+\n| 1 MiB | 0.88 milliseconds |\n+----------------+-------------------------------------+\n\nInstallation\n------------\n\nYou can get this library with pip:\n\n::\n\n pip install csiphash\n\nUsage\n-----\n\nCurrently there's just a single function, ``siphash24()``, that accepts\na secret key bytestring of length 16 and an arbitrary length bytestring\nfor the message, and returns an 8-byte digest bytestring:\n\n.. code:: pycon\n\n >>> from csiphash import siphash24\n >>> siphash24(b'\\x00' * 16, b'hello, world!\\n')\n b'\\xf1G4\\x95\\xa5\\xaa\\xc2b'\n\nIf you want to specify keys in hexadecimal, use ``.decode('hex')``:\n\n.. code:: pycon\n\n >>> siphash24('abcdef01234567899876543210fedcba'.decode('hex'), b'hello, world!\\n')\n '\\xd3\\xd4N\\x1dk\\x1f$='\n\nIf you want digests in hexadecimal, use ``.encode('hex')``:\n\n.. code:: pycon\n\n >>> siphash24(b'\\x00' * 16, b'hello, world!\\n').encode('hex')\n 'f1473495a5aac262'\n\nLicense\n-------\n\nThe reference C implementation of SipHash is bundled with this library.\nIt was written by Jean-Philippe Aumasson and Daniel J. Bernstein, and is\nreleased under the\n`CC0 `__.\n\n`Six `__ is bundled with this library. It\nwas written by Benjamin Peterson, and is licensed under the `MIT\nLicense `__.\n\nAll other software in this library is released under the\n`UNLICENSE `__:\n\n This is free and unencumbered software released into the public\n domain.\n\n Anyone is free to copy, modify, publish, use, compile, sell, or\n distribute this software, either in source code form or as a\n compiled binary, for any purpose, commercial or non-commercial, and\n by any means.\n\n In jurisdictions that recognize copyright laws, the author or\n authors of this software dedicate any and all copyright interest in\n the software to the public domain. We make this dedication for the\n benefit of the public at large and to the detriment of our heirs and\n successors. We intend this dedication to be an overt act of\n relinquishment in perpetuity of all present and future rights to\n this software under copyright law.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n For more information, please refer to http://unlicense.org/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zacharyvoase/python-csiphash", "keywords": "", "license": "UNLICENSE", "maintainer": "", "maintainer_email": "", "name": "csiphash", "package_url": "https://pypi.org/project/csiphash/", "platform": "", "project_url": "https://pypi.org/project/csiphash/", "project_urls": { "Homepage": "https://github.com/zacharyvoase/python-csiphash" }, "release_url": "https://pypi.org/project/csiphash/0.0.5/", "requires_dist": [ "cffi (>=1.4.0)" ], "requires_python": "", "summary": "A CFFI-based implementation of SipHash24", "version": "0.0.5" }, "last_serial": 2834025, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "1b79b6d69dd83545b919204e0d84014b", "sha256": "188021084b356799672e45d89267ae3d2ec01c5fe0dda8d20c4297c0e90ecbd8" }, "downloads": -1, "filename": "csiphash-0.0.2-cp27-none-macosx_10_12_intel.whl", "has_sig": false, "md5_digest": "1b79b6d69dd83545b919204e0d84014b", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 18722, "upload_time": "2016-09-22T23:52:11", "url": "https://files.pythonhosted.org/packages/8c/65/6104ae3425f7866ab1ac339be35c18d5769e9c4c7b033a7304a4491a0ff7/csiphash-0.0.2-cp27-none-macosx_10_12_intel.whl" }, { "comment_text": "", "digests": { "md5": "ceb100bf35351f19fa9ed5ba02f2be1e", "sha256": "7b57a30c022a6b13d8cacb851a5c4a9cbdc0c608dff9fd486ff00033eb23ca6e" }, "downloads": -1, "filename": "csiphash-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ceb100bf35351f19fa9ed5ba02f2be1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12784, "upload_time": "2016-09-22T23:52:17", "url": "https://files.pythonhosted.org/packages/1e/68/428f644ce5117f0ab99303174b9e8814803bcfffc5ba2044aab7482083d8/csiphash-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "797ce39af4249d0a14431f7642ee179f", "sha256": "87c5919498df2c8d749980ab55a4d7e50ef74c98e337003d2e5bf6681ba161ab" }, "downloads": -1, "filename": "csiphash-0.0.3-cp27-none-macosx_10_12_intel.whl", "has_sig": false, "md5_digest": "797ce39af4249d0a14431f7642ee179f", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 18722, "upload_time": "2016-09-23T00:13:48", "url": "https://files.pythonhosted.org/packages/59/40/5f968b4eb120eae6c349b1a11f50d9f049a3deb33918373847b601b8d9cc/csiphash-0.0.3-cp27-none-macosx_10_12_intel.whl" }, { "comment_text": "", "digests": { "md5": "e3e747b650101d8413f1d555722824a9", "sha256": "5a930c98d052d298814f98dd5a980045f4a1d617e1d2604e1e9c7c841650e29b" }, "downloads": -1, "filename": "csiphash-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e3e747b650101d8413f1d555722824a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12959, "upload_time": "2016-09-23T00:13:50", "url": "https://files.pythonhosted.org/packages/37/08/80bfcaf11d0c32a44731465681eebcf097af100670219652d55aca081b5f/csiphash-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "271636d453b52816a787e805c6fe8e24", "sha256": "395ac6b1dae093a74ac741ee7e73e5ba54ea9fab3b666a90df7a1bc79e8da366" }, "downloads": -1, "filename": "csiphash-0.0.4-cp27-none-macosx_10_12_intel.whl", "has_sig": false, "md5_digest": "271636d453b52816a787e805c6fe8e24", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 18687, "upload_time": "2016-09-23T00:45:00", "url": "https://files.pythonhosted.org/packages/1b/bc/f097d2b8450a1ba70af8b2f849837edbf7884a2cfebc3cea6f8ba7194c31/csiphash-0.0.4-cp27-none-macosx_10_12_intel.whl" }, { "comment_text": "", "digests": { "md5": "33e3102812c174c0b96bfde21541428f", "sha256": "5081a70b4b3ef9b02372de9be71283fee0e147d1b79b840e5b2c987746018b75" }, "downloads": -1, "filename": "csiphash-0.0.4.tar.gz", "has_sig": false, "md5_digest": "33e3102812c174c0b96bfde21541428f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12919, "upload_time": "2016-09-23T00:45:03", "url": "https://files.pythonhosted.org/packages/5f/3c/92f4d2acbcf77da8aa0a28cfe57083b500291df587ccf877710059ca8712/csiphash-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "d563d27bec493b3566d29bbdc4743415", "sha256": "fb44ea5aa5a36b4b45f4af9efb48fe256c96438eaaf180869c3462f5b76be6a6" }, "downloads": -1, "filename": "csiphash-0.0.5-cp27-cp27m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "d563d27bec493b3566d29bbdc4743415", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 16724, "upload_time": "2017-04-27T09:36:23", "url": "https://files.pythonhosted.org/packages/a0/e3/19bd06d65ce8e932a61332b4b00aa986974581dfdbe075eb799b656610d6/csiphash-0.0.5-cp27-cp27m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "e141ecf3f51f72faf53be20af6998f88", "sha256": "ff6d150adeb519467aabc4a84ce5e7470b7ca947b892cb8d17c3720fb9e80640" }, "downloads": -1, "filename": "csiphash-0.0.5-cp36-cp36m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "e141ecf3f51f72faf53be20af6998f88", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 16796, "upload_time": "2017-04-27T09:36:25", "url": "https://files.pythonhosted.org/packages/5e/3f/2b45249a98aaf56515f8aec62f0b77da471a8e507e6982e61fe27f068e45/csiphash-0.0.5-cp36-cp36m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "2ebb8f238456a87c810dd6dd4a9f6a4d", "sha256": "17eade97b880b40f1f090ff00e3fb60381cdc7d5aac53f4ce89c4ddb466a9900" }, "downloads": -1, "filename": "csiphash-0.0.5.tar.gz", "has_sig": false, "md5_digest": "2ebb8f238456a87c810dd6dd4a9f6a4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12928, "upload_time": "2017-04-27T09:36:26", "url": "https://files.pythonhosted.org/packages/c5/34/906ea34f74f5dd53a066f16cf5fe9cdf02bd2fd1be3451a2ddc26c9dec68/csiphash-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d563d27bec493b3566d29bbdc4743415", "sha256": "fb44ea5aa5a36b4b45f4af9efb48fe256c96438eaaf180869c3462f5b76be6a6" }, "downloads": -1, "filename": "csiphash-0.0.5-cp27-cp27m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "d563d27bec493b3566d29bbdc4743415", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 16724, "upload_time": "2017-04-27T09:36:23", "url": "https://files.pythonhosted.org/packages/a0/e3/19bd06d65ce8e932a61332b4b00aa986974581dfdbe075eb799b656610d6/csiphash-0.0.5-cp27-cp27m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "e141ecf3f51f72faf53be20af6998f88", "sha256": "ff6d150adeb519467aabc4a84ce5e7470b7ca947b892cb8d17c3720fb9e80640" }, "downloads": -1, "filename": "csiphash-0.0.5-cp36-cp36m-macosx_10_12_x86_64.whl", "has_sig": false, "md5_digest": "e141ecf3f51f72faf53be20af6998f88", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 16796, "upload_time": "2017-04-27T09:36:25", "url": "https://files.pythonhosted.org/packages/5e/3f/2b45249a98aaf56515f8aec62f0b77da471a8e507e6982e61fe27f068e45/csiphash-0.0.5-cp36-cp36m-macosx_10_12_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "2ebb8f238456a87c810dd6dd4a9f6a4d", "sha256": "17eade97b880b40f1f090ff00e3fb60381cdc7d5aac53f4ce89c4ddb466a9900" }, "downloads": -1, "filename": "csiphash-0.0.5.tar.gz", "has_sig": false, "md5_digest": "2ebb8f238456a87c810dd6dd4a9f6a4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12928, "upload_time": "2017-04-27T09:36:26", "url": "https://files.pythonhosted.org/packages/c5/34/906ea34f74f5dd53a066f16cf5fe9cdf02bd2fd1be3451a2ddc26c9dec68/csiphash-0.0.5.tar.gz" } ] }