{"id":16217277,"url":"https://github.com/synodriver/libenigma","last_synced_at":"2025-10-14T09:18:36.977Z","repository":{"id":216326604,"uuid":"740985888","full_name":"synodriver/libenigma","owner":"synodriver","description":"enigma machine in pure C","archived":false,"fork":false,"pushed_at":"2024-03-27T13:50:57.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T23:14:25.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/synodriver.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"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-01-09T13:25:07.000Z","updated_at":"2024-01-09T13:26:13.000Z","dependencies_parsed_at":"2024-01-09T16:59:47.325Z","dependency_job_id":"66258f81-d217-4dc5-9ee3-36857ab19982","html_url":"https://github.com/synodriver/libenigma","commit_stats":null,"previous_names":["synodriver/libenigma"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synodriver/libenigma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flibenigma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flibenigma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flibenigma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flibenigma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synodriver","download_url":"https://codeload.github.com/synodriver/libenigma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flibenigma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018499,"owners_count":26086383,"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-10-14T02:00:06.444Z","response_time":60,"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-10-10T11:26:22.902Z","updated_at":"2025-10-14T09:18:36.907Z","avatar_url":"https://github.com/synodriver.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enigma \n### C写的恩尼格玛 不怎么高效 为了模拟机械结构只能串行加密，一次1字节\n\n\n### 公开函数\n```c\ntypedef struct enigma_machine_s\n{\n    size_t encode_count;\n    size_t rollers;\n    uint8_t *forward_maps; // rollers*256\n    uint8_t *reverse_maps; // rollers*256\n    uint8_t (*reflect_func)(void *, uint8_t);\n\n    // f(f(x))==x f(x)!=x\n    void *reflect_ud;\n\n    uint8_t (*replace_func)(void *, uint8_t);\n\n    // f(f(x))==x\n    void *replace_ud;\n    // 256\n} enigma_machine_t;\n\n\nenigma_machine_t *\nenigma_machine_new(const uint8_t *maps, size_t mapsize,\nuint8_t (*reflect_func)(void *, uint8_t),\nvoid *reflect_ud,\nuint8_t (*replace_func)(void *, uint8_t),\nvoid *replace_ud);\n\nvoid\nenigma_machine_del(enigma_machine_t *self);\n\nvoid\nenigma_machine_roll(enigma_machine_t *self, size_t idx, int count);\n\nvoid\nenigma_machine_encode_into(enigma_machine_t *self, const uint8_t *data, size_t len, uint8_t *out);\n\nvoid\nenigma_machine_encode_inplace(enigma_machine_t *self, uint8_t *data, size_t len);\n\nbool\nenigma_machine_test_replace(enigma_machine_t *self);\n\nbool\nenigma_machine_test_reflect(enigma_machine_t *self);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Flibenigma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynodriver%2Flibenigma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Flibenigma/lists"}