{"id":20169452,"url":"https://github.com/delphinus/random-string","last_synced_at":"2025-03-03T04:14:32.802Z","repository":{"id":52304682,"uuid":"90577003","full_name":"delphinus/random-string","owner":"delphinus","description":"Library to make passwords without misleading letters","archived":false,"fork":false,"pushed_at":"2017-05-21T05:59:39.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T15:23:34.736Z","etag":null,"topics":["go","golang","password-generator","random-string"],"latest_commit_sha":null,"homepage":"","language":"Go","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/delphinus.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-05-08T02:10:03.000Z","updated_at":"2022-08-03T12:57:12.000Z","dependencies_parsed_at":"2022-09-06T08:41:06.111Z","dependency_job_id":null,"html_url":"https://github.com/delphinus/random-string","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delphinus%2Frandom-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delphinus%2Frandom-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delphinus%2Frandom-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delphinus%2Frandom-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delphinus","download_url":"https://codeload.github.com/delphinus/random-string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605820,"owners_count":19989612,"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":["go","golang","password-generator","random-string"],"created_at":"2024-11-14T01:12:32.844Z","updated_at":"2025-03-03T04:14:32.784Z","avatar_url":"https://github.com/delphinus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RandomString -- Library to make passwords without misleading letters\n\n[![CircleCI](https://circleci.com/gh/delphinus/random-string.svg?style=svg)](https://circleci.com/gh/delphinus/random-string)\n[![Coverage Status](https://coveralls.io/repos/github/delphinus/random-string/badge.svg)](https://coveralls.io/github/delphinus/random-string)\n\nThis package makes random passwords with fast logic described in [this link][].\n\n[this link]: http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang\n\nThe original logic is NOT goroutine safe because it shares `rand.Source` and the `Int63()` calls conflict. The logic in this package is using `sync.Mutex` to solve this.\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n\n  \"github.com/delphinus/random-string\"\n)\n\nfunc main() {\n  pass := randomString.Generate(8);\n  fmt.Printf(\"simple password: %s\\n\", pass)\n\t// simple password: JEVGqkiW\n}\n```\n\n## Benchmark\n\n```go\ngo version\ngo version go1.8.1 darwin/amd64\ngo test -bench . -benchmem\nBenchmarkRandomString/Runes-8              50000             35584 ns/op            1312 B/op          2 allocs/op\nBenchmarkRandomString/Bytes-8              50000             35547 ns/op             512 B/op          2 allocs/op\nBenchmarkRandomString/Remainder-8          50000             34095 ns/op             512 B/op          2 allocs/op\nBenchmarkRandomString/Mask-8               50000             35362 ns/op             512 B/op          2 allocs/op\nBenchmarkRandomString/MaskImproved-8      300000              4710 ns/op             512 B/op          2 allocs/op\nBenchmarkRandomString/MaskSource-8        500000              3873 ns/op             512 B/op          2 allocs/op\nPASS\nok      github.com/delphinus/random-string      11.885s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelphinus%2Frandom-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelphinus%2Frandom-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelphinus%2Frandom-string/lists"}