{"id":18665321,"url":"https://github.com/robertklep/node-metrohash","last_synced_at":"2025-10-08T04:47:40.080Z","repository":{"id":32843473,"uuid":"36437002","full_name":"robertklep/node-metrohash","owner":"robertklep","description":"Node.js bindings for MetroHash","archived":false,"fork":false,"pushed_at":"2025-01-22T09:07:53.000Z","size":307,"stargazers_count":27,"open_issues_count":5,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T23:16:08.385Z","etag":null,"topics":["hash-functions","javascript","metrohash","node"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/robertklep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-05-28T12:30:51.000Z","updated_at":"2025-03-14T03:49:30.000Z","dependencies_parsed_at":"2024-06-18T18:18:04.682Z","dependency_job_id":null,"html_url":"https://github.com/robertklep/node-metrohash","commit_stats":{"total_commits":78,"total_committers":4,"mean_commits":19.5,"dds":0.07692307692307687,"last_synced_commit":"f55661430a5dd0b00d8dc3489bcc62c2dce76f8f"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/robertklep/node-metrohash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-metrohash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-metrohash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-metrohash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-metrohash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertklep","download_url":"https://codeload.github.com/robertklep/node-metrohash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-metrohash/sbom","scorecard":{"id":780250,"data":{"date":"2025-08-11","repo":{"name":"github.com/robertklep/node-metrohash","commit":"cf321dc5b731ac60cd907379ca5ee59ccd0ef849"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/23 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T04:44:24.003Z","repository_id":32843473,"created_at":"2025-08-23T04:44:24.003Z","updated_at":"2025-08-23T04:44:24.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891749,"owners_count":26063855,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hash-functions","javascript","metrohash","node"],"created_at":"2024-11-07T08:27:11.750Z","updated_at":"2025-10-08T04:47:40.032Z","avatar_url":"https://github.com/robertklep.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-metrohash\n\nWrapper around [MetroHash](https://github.com/jandrewrogers/MetroHash).\n\n[![Build Status](https://travis-ci.org/robertklep/node-metrohash.svg)](https://travis-ci.org/robertklep/node-metrohash)\n[![Build status](https://ci.appveyor.com/api/projects/status/49944yng9l70q41k/branch/master?svg=true)](https://ci.appveyor.com/project/robertklep/node-metrohash/branch/master)\n\n### Installation\n\n```\n$ npm install metrohash\n```\n\n### API change!\n\nBetween v1 and v2, the API for this library has changed to allow for maximum hashing speed.\n\nThe biggest change is that a calculated hash is now returned as a (hex-encoded) string instead of a `Buffer`.\n\nIf a `Buffer` is still required, it's easy to convert the string:\n\n```\nlet buffer = Buffer.from(metrohash64('input'), 'hex');\n```\n\nAlso, the `.hash()` methods for the hasher classes have been removed in favor of standalone functions (see below).\n\n### Usage\n\nThe module exports 2 classes, `MetroHash64` and `MetroHash128`, and two functions, `metrohash64` and `metrohash128`.\n\nThe classes are meant for incremental hashing, the functions for standalone hash calculations.\n\nThe class constructors and functions accept an optional `seed` numerical argument, which defaults to `0`.\n\n#### Class interface\n\n``` javascript\nconst MetroHash64 = require('metrohash').MetroHash64;\n\n// Constructor.\nMetroHash64(seed? : number) : this\n\n// Update.\nMetroHash64#update(input : String | Buffer) : this\n\n// Finalize and get hash digest.\nMetroHash64#digest() : String\n```\n\n(likewise for `MetroHash128`).\n\n#### Function interface\n\n```\nconst metrohash64 = require('metrohash').metrohash64;\n\nmetrohash64(input : String | Buffer, seed? : number) : String\n```\n\n(likewise for `metrohash128`).\n\n### Examples\n\n``` javascript\n//// Classes\n\nconst MetroHash64 = require('metrohash').MetroHash64;\n\n// Instantiate using seed 123 (`new` is optional).\nlet hash = new MetroHash64(123);\n\n// Update using a string as input.\nhash.update('Hello, World!');\n\n// The same as above:\n// hash.update('Hello, ').update('World!');\n\n// Finalize to get the digest as a hex string.\nlet digest = hash.digest();\n\n//// Functions\nconst metrohash64 = require('metrohash').metrohash64;\n\nlet digest = metrohash64('Hello, World!', 123);\n```\n\n### Speed\n\nFrom v2.0 onwards, MetroHash is [pretty fast](https://medium.com/@drainingsun/in-search-of-a-good-node-js-hashing-algorithm-8052b6923a3b).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnode-metrohash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertklep%2Fnode-metrohash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnode-metrohash/lists"}