{"id":15015511,"url":"https://github.com/mauke/sys-getrandom-pp","last_synced_at":"2026-01-31T19:02:15.103Z","repository":{"id":232090691,"uuid":"783448515","full_name":"mauke/Sys-GetRandom-PP","owner":"mauke","description":"Sys::GetRandom::PP - pure Perl interface to getrandom(2)","archived":false,"fork":false,"pushed_at":"2024-09-24T23:10:01.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-11T05:03:15.935Z","etag":null,"topics":["getrandom","perl","perl-module","random"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Sys::GetRandom::PP","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauke.png","metadata":{"files":{"readme":".github/README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"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":"2024-04-07T22:40:16.000Z","updated_at":"2024-09-24T23:10:05.000Z","dependencies_parsed_at":"2024-11-18T17:44:45.982Z","dependency_job_id":"32de49a5-e9e5-456c-a6bc-1d0d24e7f654","html_url":"https://github.com/mauke/Sys-GetRandom-PP","commit_stats":null,"previous_names":["mauke/sys-getrandom-pp"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mauke/Sys-GetRandom-PP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauke%2FSys-GetRandom-PP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauke%2FSys-GetRandom-PP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauke%2FSys-GetRandom-PP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauke%2FSys-GetRandom-PP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauke","download_url":"https://codeload.github.com/mauke/Sys-GetRandom-PP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauke%2FSys-GetRandom-PP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28950279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["getrandom","perl","perl-module","random"],"created_at":"2024-09-24T19:47:33.864Z","updated_at":"2026-01-31T19:02:15.089Z","avatar_url":"https://github.com/mauke.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nSys::GetRandom::PP - pure Perl interface to getrandom(2)\n\n# SYNOPSIS\n\n```perl\nuse Sys::GetRandom::PP qw(getrandom random_bytes GRND_NONBLOCK GRND_RANDOM);\nmy $n = getrandom($buf, $count, $flags);\nmy $bytes = random_bytes($count);\n```\n\n# DESCRIPTION\n\nThis module provides a Perl interface to the [getrandom(2)](http://man.he.net/man2/getrandom) call present on\nLinux and FreeBSD. It exports (on request) two functions and two constants.\n\nIt is written in pure Perl using the [syscall](https://perldoc.perl.org/perlfunc#syscall-NUMBER-LIST)\nfunction. Otherwise it presents the same interface as [Sys::GetRandom](https://metacpan.org/pod/Sys%3A%3AGetRandom), which\nis written in C.\n\n## Functions\n\n- getrandom SCALAR, LENGTH\n- getrandom SCALAR, LENGTH, FLAGS\n\n    Generates up to *LENGTH* bytes of random data and stores them in *SCALAR*.\n    Returns the number of random bytes generated, or `undef` on error (in which\n    case `$!` is also set).\n\n    By default, `getrandom` is equivalent to reading from `/dev/urandom` (but\n    without accessing the file system or requiring the use of a file descriptor).\n    If `/dev/urandom` has not been initialized yet, `getrandom` will block by\n    default.\n\n    If `/dev/urandom` has been initialized and *LENGTH* is 256 or less,\n    `getrandom` will atomically return the requested amount of random data (i.e.\n    it will generate exactly *LENGTH* bytes of data and will not be interrupted by\n    a signal). For larger values of *LENGTH* it may be interrupted by signals and\n    either generate fewer random bytes than requested or fail with `$!` set to\n    `EINTR`.\n\n    The *FLAGS* argument must be either 0 (the default value) or the bitwise OR of\n    one or more of the following flags:\n\n    - `GRND_RANDOM`\n\n        Read from the same source as `/dev/random`, not `/dev/urandom` (the default).\n\n    - `GRND_NONBLOCK`\n\n        By default, `getrandom` will block if `/dev/urandom` has not been initialized\n        yet or (with `GRND_RANDOM`) if there are no random bytes available in\n        `/dev/random`. If the `GRND_NONBLOCK` flag is passed, it will fail\n        immediately instead, returning `undef` and setting `$!` to `EAGAIN`.\n\n- random\\_bytes LENGTH\n\n    Generates and returns a string of *LENGTH* random bytes.\n\n    *LENGTH* must be between 0 and 256 (inclusive).\n\n    This is just a wrapper around `getrandom` with default flags.\n\n# SEE ALSO\n\n[Sys::GetRandom](https://metacpan.org/pod/Sys%3A%3AGetRandom),\n[getrandom(2)](http://man.he.net/man2/getrandom),\n[h2ph](https://metacpan.org/pod/h2ph)\n\n# AUTHOR\n\nLukas Mai, `\u003clmai at web.de\u003e`\n\n# COPYRIGHT \u0026 LICENSE\n\nCopyright 2024 Lukas Mai.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of either: the GNU General Public License as published\nby the Free Software Foundation; or the Artistic License.\n\nSee [https://dev.perl.org/licenses/](https://dev.perl.org/licenses/) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauke%2Fsys-getrandom-pp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauke%2Fsys-getrandom-pp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauke%2Fsys-getrandom-pp/lists"}