{"id":16217257,"url":"https://github.com/synodriver/lua-enigma","last_synced_at":"2025-04-07T23:14:31.180Z","repository":{"id":230043728,"uuid":"742688830","full_name":"synodriver/lua-enigma","owner":"synodriver","description":"lua binding for libenigma","archived":false,"fork":false,"pushed_at":"2024-03-27T13:59:48.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T00:23:40.180Z","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}},"created_at":"2024-01-13T04:18:45.000Z","updated_at":"2024-01-13T04:19:01.000Z","dependencies_parsed_at":"2024-03-27T14:59:10.578Z","dependency_job_id":"665f908d-e097-44ef-9615-62206786a41d","html_url":"https://github.com/synodriver/lua-enigma","commit_stats":null,"previous_names":["synodriver/lua-enigma"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flua-enigma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flua-enigma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flua-enigma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Flua-enigma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synodriver","download_url":"https://codeload.github.com/synodriver/lua-enigma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744333,"owners_count":20988783,"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":[],"created_at":"2024-10-10T11:26:19.022Z","updated_at":"2025-04-07T23:14:31.155Z","avatar_url":"https://github.com/synodriver.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lua-binding for libenigma\n\n```lua\nlocal enigma = require(\"enigma\")\nlocal keyf = io.open(\"dumpekey.bin\", \"rb\")\nlocal data = keyf:read(\"a\")\nprint(data)\nio.close(keyf)\nassert(#data== 512)\n\nlocal machine = enigma.new(data, function (x) if x%2==0 then return x+1 else return x-1 end end, function(x) return x end)\nassert(machine:rollers()==2)\nmachine:roll(0,10)\nmachine:roll(1,20)\nassert(machine:rollers()==2)\nlocal p1, p2=machine:current_position()\nassert(p1==10)\nassert(p2==20)\nassert(machine:test_replace())\nassert(machine:test_reflect())\n\nlocal encryptedf = io.open(\"encrypted.bin\", \"rb\")\nlocal encrypteddata = encryptedf:read(\"a\")\nio.close( encryptedf)\nprint(machine:encode(encrypteddata))\nlocal newm = machine:dup()\nassert(newm:test_replace())\nassert(newm:test_reflect())\nassert(newm:current_position()==machine:current_position())\n\nprint(machine:_ref())\nprint(newm:_ref())\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Flua-enigma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynodriver%2Flua-enigma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Flua-enigma/lists"}