{"id":37028805,"url":"https://github.com/crypto-utils/random-bytes","last_synced_at":"2026-01-14T03:27:01.106Z","repository":{"id":57158874,"uuid":"49807378","full_name":"crypto-utils/random-bytes","owner":"crypto-utils","description":"Generate strong pseudo-random bytes","archived":false,"fork":false,"pushed_at":"2021-02-13T05:48:51.000Z","size":59,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-09T22:27:02.305Z","etag":null,"topics":["bytes","javascript","nodejs","pseudo-random-bytes","random-bytes"],"latest_commit_sha":null,"homepage":null,"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/crypto-utils.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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":"2016-01-17T07:21:52.000Z","updated_at":"2024-08-18T01:12:57.000Z","dependencies_parsed_at":"2022-09-07T20:51:01.249Z","dependency_job_id":null,"html_url":"https://github.com/crypto-utils/random-bytes","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/crypto-utils/random-bytes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-utils%2Frandom-bytes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-utils%2Frandom-bytes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-utils%2Frandom-bytes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-utils%2Frandom-bytes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crypto-utils","download_url":"https://codeload.github.com/crypto-utils/random-bytes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crypto-utils%2Frandom-bytes/sbom","scorecard":{"id":310162,"data":{"date":"2025-08-11","repo":{"name":"github.com/crypto-utils/random-bytes","commit":"460319efe17fb9ff3bf8e96d17e6f0a61eac41c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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"}}]},"last_synced_at":"2025-08-17T23:02:50.225Z","repository_id":57158874,"created_at":"2025-08-17T23:02:50.225Z","updated_at":"2025-08-17T23:02:50.225Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28386149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T12:01:30.995Z","status":"ssl_error","status_checked_at":"2026-01-13T12:00:09.625Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bytes","javascript","nodejs","pseudo-random-bytes","random-bytes"],"created_at":"2026-01-14T03:27:00.515Z","updated_at":"2026-01-14T03:27:01.099Z","avatar_url":"https://github.com/crypto-utils.png","language":"JavaScript","readme":"# random-bytes\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nGenerate strong pseudo-random bytes.\n\nThis module is a simple wrapper around the Node.js core `crypto.randomBytes` API,\nwith the following additions:\n\n  * A `Promise` interface for environments with promises.\n  * For Node.js versions that do not wait for the PRNG to be seeded, this module\n    will wait a bit.\n\n## Installation\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```sh\n$ npm install random-bytes\n```\n\n## API\n\n\u003c!-- eslint-disable no-unused-vars --\u003e\n\n```js\nvar randomBytes = require('random-bytes')\n```\n\n### randomBytes(size, callback)\n\nGenerates strong pseudo-random bytes. The `size` argument is a number indicating\nthe number of bytes to generate.\n\n\u003c!-- eslint-disable no-undef --\u003e\n\n```js\nrandomBytes(12, function (error, bytes) {\n  if (error) throw error\n  // do something with the bytes\n})\n```\n\n### randomBytes(size)\n\nGenerates strong pseudo-random bytes and return a `Promise`. The `size` argument is\na number indicating the number of bytes to generate.\n\n**Note**: To use promises in Node.js _prior to 0.12_, promises must be\n\"polyfilled\" using `global.Promise = require('bluebird')`.\n\n\u003c!-- eslint-disable no-undef --\u003e\n\n```js\nrandomBytes(18).then(function (string) {\n  // do something with the string\n})\n```\n\n### randomBytes.sync(size)\n\nA synchronous version of above.\n\n\u003c!-- eslint-disable no-undef, no-unused-vars --\u003e\n\n```js\nvar bytes = randomBytes.sync(18)\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/random-bytes.svg\n[npm-url]: https://npmjs.org/package/random-bytes\n[node-version-image]: https://img.shields.io/node/v/random-bytes.svg\n[node-version-url]: https://nodejs.org/en/download\n[travis-image]: https://img.shields.io/travis/crypto-utils/random-bytes/master.svg\n[travis-url]: https://travis-ci.org/crypto-utils/random-bytes\n[coveralls-image]: https://img.shields.io/coveralls/crypto-utils/random-bytes/master.svg\n[coveralls-url]: https://coveralls.io/r/crypto-utils/random-bytes?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/random-bytes.svg\n[downloads-url]: https://npmjs.org/package/random-bytes\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrypto-utils%2Frandom-bytes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrypto-utils%2Frandom-bytes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrypto-utils%2Frandom-bytes/lists"}