{"id":17175846,"url":"https://github.com/sc0vu/js-keccak-tiny","last_synced_at":"2025-04-13T17:06:21.503Z","repository":{"id":34326561,"uuid":"175798847","full_name":"sc0Vu/js-keccak-tiny","owner":"sc0Vu","description":"Keccak tiny emscripten binding in javascript, including SHA-3/Keccak/Shake hash function.","archived":false,"fork":false,"pushed_at":"2022-12-08T18:58:37.000Z","size":924,"stargazers_count":3,"open_issues_count":9,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-18T23:18:45.904Z","etag":null,"topics":["cryptography","hash","keccak","keccak-tiny","sha3","shake","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://sc0vu.github.io/keccak.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sc0Vu.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}},"created_at":"2019-03-15T10:25:55.000Z","updated_at":"2021-05-09T03:48:13.000Z","dependencies_parsed_at":"2023-01-15T06:20:24.414Z","dependency_job_id":null,"html_url":"https://github.com/sc0Vu/js-keccak-tiny","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sc0Vu%2Fjs-keccak-tiny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sc0Vu%2Fjs-keccak-tiny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sc0Vu%2Fjs-keccak-tiny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sc0Vu%2Fjs-keccak-tiny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sc0Vu","download_url":"https://codeload.github.com/sc0Vu/js-keccak-tiny/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240361612,"owners_count":19789507,"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":["cryptography","hash","keccak","keccak-tiny","sha3","shake","wasm","webassembly"],"created_at":"2024-10-14T23:57:53.981Z","updated_at":"2025-02-23T18:34:38.361Z","avatar_url":"https://github.com/sc0Vu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-keccak-tiny\n[![CI](https://github.com/sc0Vu/js-keccak-tiny/actions/workflows/ci.yml/badge.svg)](https://github.com/sc0Vu/js-keccak-tiny/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/sc0Vu/js-keccak-tiny/branch/master/graph/badge.svg)](https://codecov.io/gh/sc0Vu/js-keccak-tiny)\n\nKeccak tiny wasm binding in javascript.\n\n# Keccak tiny\n\nKeccak tiny is a c implementation of keccak, the original repository https://github.com/status-im/nim-keccak-tiny.\n\n# Install\n\n* install library\n\n```BASH\n$ npm install js-keccak-tiny\n```\n\n# Build with emscripten\n\nYou can build keccak-tiny wasm yourself with emscripten. To konw how to install or setup emscripten on your computer, please check their documentation https://emscripten.org/docs/getting_started/index.html. I build two version of keccak-tiny - nodejs and web. The only difference between two version is that there is no file system in web version.\n\n```BASH\n$ sh build.sh\n```\n\nAfter build wasm files, you should build javascript library again.\n\n```BASH\n$ npm run build\n```\n\n# Usage\n\n* Hash message\n```JS\n// for nodejs\nconst keccakHashAsync = require('js-keccak-tiny/dist/node-bundle')\n\n// for browser\nconst keccakHashAsync = require('js-keccak-tiny/dist/browser-bundle')\n\nconst msg = Buffer.from('It works!', 'utf8')\n\n// initialize the library\nkeccakTiny = await keccakHashAsync()\n\nlet hash = keccakTiny.keccak256(msg)\n// do something to hash...\n```\n# Benchmark\n\nComputer: 2.2 GHz 6-Core Intel Core i7\n\n```\n$ node -v\nv12.18.1\n\n\u003e keccak-benchmark@0.0.0 start /Users/peterlai/Desktop/Projects/js-keccak-tiny/benchmarks\n\u003e node index.js\n\nKeccak tiny (current) x 558,114 ops/sec ±1.68% (89 runs sampled)\nPure JS (keccak) x 288,401 ops/sec ±0.55% (97 runs sampled)\nPure JS (sha3) x 13,370 ops/sec ±1.57% (90 runs sampled)\nPure JS (js-sha3) x 280,340 ops/sec ±0.41% (94 runs sampled)\nBuffer 0bytes: fastest is Keccak tiny (current)\nKeccak tiny (current) x 15.01 ops/sec ±1.04% (42 runs sampled)\nPure JS (keccak) x 4.21 ops/sec ±2.51% (15 runs sampled)\nPure JS (sha3) x 0.18 ops/sec ±4.71% (5 runs sampled)\nPure JS (js-sha3) x 4.26 ops/sec ±1.81% (15 runs sampled)\nBuffer 10MiB: fastest is Keccak tiny (current)\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc0vu%2Fjs-keccak-tiny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsc0vu%2Fjs-keccak-tiny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc0vu%2Fjs-keccak-tiny/lists"}