{"id":13438234,"url":"https://github.com/jedisct1/siphash-js","last_synced_at":"2025-04-08T11:14:51.811Z","repository":{"id":3687614,"uuid":"4757866","full_name":"jedisct1/siphash-js","owner":"jedisct1","description":"A Javascript implementation of SipHash-2-4","archived":false,"fork":false,"pushed_at":"2024-12-10T00:18:27.000Z","size":80,"stargazers_count":125,"open_issues_count":0,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T10:12:15.929Z","etag":null,"topics":["authentication","crypto","cryptography","hash","javascript","siphash","typescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dff-solutions/SignalR.Reactive","license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedisct1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-06-23T02:09:32.000Z","updated_at":"2025-02-10T23:53:36.000Z","dependencies_parsed_at":"2025-02-24T10:21:51.908Z","dependency_job_id":null,"html_url":"https://github.com/jedisct1/siphash-js","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fsiphash-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fsiphash-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fsiphash-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fsiphash-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/siphash-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829512,"owners_count":21002997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","crypto","cryptography","hash","javascript","siphash","typescript"],"created_at":"2024-07-31T03:01:03.882Z","updated_at":"2025-04-08T11:14:51.774Z","avatar_url":"https://github.com/jedisct1.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"siphash.js\n==========\n\nA pure Javascript implementation of\n[SipHash](https://www.aumasson.jp/siphash/siphash.pdf)\n\n\u003e SipHash is a family of pseudorandom functions optimized for short\n\u003e inputs. Target applications include network traffic authentication and\n\u003e hash-table lookups protected against hash-flooding denial-of-service\n\u003e attacks. SipHash has well-defined security goals and competitive\n\u003e performance.\n\nThis package also includes implementations of SipHash-1-3, SipHash128, and SipHash128-1-3.\n\nInstallation\n------------\n\nServer-side installation (io.js/nodejs):\n\n    $ npm install siphash\n\nBrowser-side/single-line minified version: use\n[lib/siphash.js.min](https://raw.githubusercontent.com/jedisct1/siphash-js/master/lib/siphash.js.min).\nor use Bower:\n\n    $ bower install siphash\n\nUsage\n-----\n\n```javascript\nvar siphash = require(\"siphash\"),\n    key = siphash.string16_to_key(\"This is the key!\"),\n    message = \"Short test message\",\n    hash_hex = siphash.hash_hex(key, message);\n```\n\nA key is an array of 4 integers, and each of them will be clamped to\n32 bits in order to build a 128-bit key.\nFor a random key, just generate 4 random integers instead of calling\n`string16_to_key()`.\n\n```javascript\nvar siphash = require(\"siphash\"),\n    key = [ 0xdeadbeef, 0xcafebabe, 0x8badf00d, 0x1badb002 ],\n    message = \"Short test message\",\n    hash_hex = siphash.hash_hex(key, message);\n```\n\nThe 64-bit hash can also be obtained as two 32-bit values with\n`hash(key, message)`:\n\n```javascript\nvar siphash = require(\"siphash\"),\n    key = [ 0xdeadbeef, 0xcafebabe, 0x8badf00d, 0x1badb002 ],\n    message = \"Short test message\",\n    hash = siphash.hash(key, message),\n    hash_msb = hash.h,\n    hash_lsb = hash.l;\n```\n\nA 53-bit unsigned integer can be obtained with `hash_uint(key, message)`:\n\n```javascript\nvar siphash = require(\"siphash\"),\n    key = siphash.string16_to_key(\"0123456789ABCDEF\"),\n    message = \"Short test message\",\n    index = siphash.hash_uint(key, message);\n```\n\nSipHash-1-3\n-----------\nSipHash-1-3 is a faster variant of SipHash-2-4 with fewer rounds, which is still believed to be secure\nenough for typical uses. This variant is available here:\n[siphash13.js](https://raw.githubusercontent.com/jedisct1/siphash-js/master/lib/siphash13.js.min)\n\n\nSipHash-double\n--------------\n\nAlthough not part of the module, an implementation of SipHash with\n128-bit output is also available:\n[siphash-double.js](https://raw.githubusercontent.com/jedisct1/siphash-js/master/lib/siphash-double.js.min)\n\nSipHash-1-3 with a 128-bit output is also part of the package:\n[siphash13-double.js](https://raw.githubusercontent.com/jedisct1/siphash-js/master/lib/siphash13-double.js.min)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Fsiphash-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Fsiphash-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Fsiphash-js/lists"}