{"id":17306657,"url":"https://github.com/tcort/arc4random","last_synced_at":"2025-10-04T05:44:49.236Z","repository":{"id":24835875,"uuid":"28250605","full_name":"tcort/arc4random","owner":"tcort","description":"Native bindings for the arc4random() family of funcitons.","archived":false,"fork":false,"pushed_at":"2018-05-21T13:56:11.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-21T08:39:56.281Z","etag":null,"topics":["arc4random","libbsd","native-bindings","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tcort.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-19T23:37:38.000Z","updated_at":"2018-05-21T13:56:09.000Z","dependencies_parsed_at":"2022-07-25T14:32:36.001Z","dependency_job_id":null,"html_url":"https://github.com/tcort/arc4random","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Farc4random","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Farc4random/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Farc4random/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcort%2Farc4random/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcort","download_url":"https://codeload.github.com/tcort/arc4random/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228251216,"owners_count":17891752,"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":["arc4random","libbsd","native-bindings","nodejs"],"created_at":"2024-10-15T11:59:00.979Z","updated_at":"2025-10-04T05:44:44.198Z","avatar_url":"https://github.com/tcort.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"arc4random\n==========\n\nNative bindings for the `arc4random()` family of funcitons:\n\n* `arc4random()`\n* `arc4random_buf(buf, nbytes)`\n* `arc4random_uniform(upper_bound)`\n\nRequirements\n------------\n\n* [nodejs](http://nodejs.org/) or [iojs](https://iojs.org/)\n* Operating system with a native `arc4random()` function or [libbsd](http://libbsd.freedesktop.org/):\n  * [Mac OS X (darwin)](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/arc4random.3.html)\n  * [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=arc4random\u0026sektion=3)\n  * [OpenBSD](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/arc4random.3?query=arc4random\u0026sec=3)\n  * [NetBSD](http://netbsd.gw.com/cgi-bin/man-cgi?arc4random++NetBSD-current)\n  * [Linux via libbsd](http://libbsd.freedesktop.org)\n\nInstallation\n------------\n\nThe latest and greatest version of this software is available through [npm](http://npmjs.org/).\n\n    npm install arc4random\n\nUsage\n-----\n\n    const rng = require('arc4random');\n\n    // returns an integer in the range [0, 2^32)\n    const randomNumber = rng.arc4random();\n\n    // stores nbytes integers in the given buffer.\n    // each byte is an integer in the range [0, 256)\n    const nbytes = 255;\n    const buf = Buffer.alloc(nbytes);\n    rng.arc4random_buf(buf, nbytes);\n\n    // returns an integer in the range [0, upper_bound)\n    const anotherRandomNumber = rng.arc4random_uniform(16);\n\nLicense\n-------\n\nSee [LICENSE.md](https://github.com/tcort/arc4random/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcort%2Farc4random","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcort%2Farc4random","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcort%2Farc4random/lists"}