{"id":20665862,"url":"https://github.com/catap/swrng-provider","last_synced_at":"2026-05-06T13:10:42.543Z","repository":{"id":66725263,"uuid":"271793904","full_name":"catap/swrng-provider","owner":"catap","description":"A SecureRandomSPI that makes SwiftRNG devices available to SecureRandom","archived":false,"fork":false,"pushed_at":"2020-10-13T22:45:05.000Z","size":47,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-20T05:02:55.225Z","etag":null,"topics":["clojure","java","jvm","scala","securerandom","swiftrng"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-06-12T12:32:54.000Z","updated_at":"2022-12-24T14:48:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"234c9aa4-d61c-456e-a30a-9c6e4d452d9b","html_url":"https://github.com/catap/swrng-provider","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/catap/swrng-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catap%2Fswrng-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catap%2Fswrng-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catap%2Fswrng-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catap%2Fswrng-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catap","download_url":"https://codeload.github.com/catap/swrng-provider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catap%2Fswrng-provider/sbom","scorecard":{"id":267759,"data":{"date":"2025-08-11","repo":{"name":"github.com/catap/swrng-provider","commit":"1b57885036b37fb61355bf32ffc7c5519b385884"},"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/18 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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: The Unlicense: LICENSE.txt: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":"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"}}]},"last_synced_at":"2025-08-17T12:34:05.963Z","repository_id":66725263,"created_at":"2025-08-17T12:34:05.963Z","updated_at":"2025-08-17T12:34:05.963Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32695085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"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":["clojure","java","jvm","scala","securerandom","swiftrng"],"created_at":"2024-11-16T19:34:19.118Z","updated_at":"2026-05-06T13:10:42.526Z","avatar_url":"https://github.com/catap.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftRNG SecureRandomSPI\n\nA `SecureRandomSPI` that makes SwiftRNG devices available to `SecureRandom`.\n\nThis code automatically detect attached devices on Linux and macOS,\n and when a machine has more of one SwiftRNG it uses round-robin algorithm\n to balance `getRandomBytes` calls between devices.\n\nTo use it you should add this provider to dependency like\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003eky.korins\u003c/groupId\u003e\n  \u003cartifactId\u003eswrng-provider\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nand use via specified instance:\n```\n  SecureRandom random = SecureRandom.getInstance(\"SwiftRNG\");\n```\n\nBut you should configure it. The easy way is adding this security provider by hand:\n```\n  Security.addProvider(new SwiftRNGProvider());\n```\nor you can add it to `java.security` as\n```\nsecurity.provider.N=SwiftRNG\n```\nwhere `N` should be the value of the last provider incremented by `1`.\n\nYou can also select one or more devices that this code should use.\nFor example we would like to use SwiftRNG that attached as `/dev/cu.usbmodemSWRNGP000A0061` we can do:\n```\nSecureRandom random = SecureRandom.getInstance(\"SwiftRNG\", new SwiftRNGParameters(Collections.singletonList(\"/dev/cu.usbmodemSWRNGP000A0061\")));\n```\nor you can specified at `java.security` comma separated list of used devices such as:\n```\nsecurerandom.swiftrng.devices=/dev/cu.usbmodemSWRNGP000A0061,/dev/cu.usbmodemSWRNGP000A0062\n```\nand this is the only way to use this provider at Windows where you can get path to the device by `mode`.\n\nThus, this code is using locking to prevent parallel using the device and this add limitation\n that only one `SecureRandom` instance can be created per device that is thread safe.\n\nYou also can test your configuration by running a `main` method from `ky.korins.swrng.SwiftRNGDevices`\n that returns all found devices like that\n```\nSwiftRNGDevice{path=/dev/cu.usbmodemSWRNGP000A0061, model='SWRNGPRO', version='V2.1', serialNumber='XXX'}\nSwiftRNGDevice{path=/dev/cu.usbmodemSWRNGP000A0062, model='SWRNGPRO', version='V2.1', serialNumber='XXX'}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatap%2Fswrng-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatap%2Fswrng-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatap%2Fswrng-provider/lists"}