{"id":20285626,"url":"https://github.com/aep/feistel","last_synced_at":"2026-05-11T00:46:39.804Z","repository":{"id":57692520,"uuid":"483177674","full_name":"aep/feistel","owner":"aep","description":"collision-free pseudorandom sequence using a feistel cipher in cycle walking mode","archived":false,"fork":false,"pushed_at":"2022-04-19T09:25:30.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T11:46:58.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/aep.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":"2022-04-19T09:21:12.000Z","updated_at":"2025-08-30T14:48:01.000Z","dependencies_parsed_at":"2022-09-26T20:52:57.215Z","dependency_job_id":null,"html_url":"https://github.com/aep/feistel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aep/feistel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aep%2Ffeistel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aep%2Ffeistel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aep%2Ffeistel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aep%2Ffeistel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aep","download_url":"https://codeload.github.com/aep/feistel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aep%2Ffeistel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27446910,"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","status":"online","status_checked_at":"2025-12-02T02:00:06.387Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-14T14:27:55.548Z","updated_at":"2025-12-02T06:03:33.903Z","avatar_url":"https://github.com/aep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"collision-free pseudorandom sequence using a feistel cipher in cycle walking mode.\n\nuseful for avoiding hotspots in free-lists, or otherwise obfuscating a unique index.\nThis is NOT encryption. it just makes a sequence look random to the human eye\n\nfor example this generates a sequence from 0 to 1000 in deterministic but random-looking order\n\n```golang\npackage main\n\nimport (\n    \"github.com/aep/feistel\"\n    \"fmt\"\n)\n\nfunc main() {\n    var max uint32 = 1000;\n    for i:=uint32(0);i\u003cmax;i++ {\n        fmt.Println(feistel.Map(i, max, \"feistel is cool\"));\n    }\n}\n```\n\noutputs all numbers between 0 and 1000 like [2, 821, 76, etc..\n\nWhen using a different seed, it creates a different sequence.\nRemember this is not actual cryptography and a determined attacker will figure out the seed\n\nmostly inspired by and maybe compatible with https://wiki.postgresql.org/wiki/Pseudo_encrypt_constrained_to_an_arbitrary_range\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faep%2Ffeistel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faep%2Ffeistel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faep%2Ffeistel/lists"}