{"id":15857406,"url":"https://github.com/micheleriva/caesar-cipher","last_synced_at":"2025-08-02T04:32:48.878Z","repository":{"id":111227863,"uuid":"177768717","full_name":"micheleriva/caesar-cipher","owner":"micheleriva","description":"👑 Dead Simple Caesar Cipher written in Haskell","archived":false,"fork":false,"pushed_at":"2019-03-26T11:29:59.000Z","size":240,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T20:04:29.666Z","etag":null,"topics":["caesar-cipher","cipher","cipher-algorithms","haskell","haskell-learning","haskell-library"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/micheleriva.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-03-26T10:48:38.000Z","updated_at":"2021-05-30T08:25:10.000Z","dependencies_parsed_at":"2023-05-31T14:30:45.776Z","dependency_job_id":null,"html_url":"https://github.com/micheleriva/caesar-cipher","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"51b21a92929e7c93c6c4b27baeba4ed1f3f526a6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/micheleriva/caesar-cipher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheleriva%2Fcaesar-cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheleriva%2Fcaesar-cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheleriva%2Fcaesar-cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheleriva%2Fcaesar-cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micheleriva","download_url":"https://codeload.github.com/micheleriva/caesar-cipher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheleriva%2Fcaesar-cipher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334612,"owners_count":24233793,"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-08-02T02:00:12.353Z","response_time":74,"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":["caesar-cipher","cipher","cipher-algorithms","haskell","haskell-learning","haskell-library"],"created_at":"2024-10-05T20:22:50.444Z","updated_at":"2025-08-02T04:32:48.846Z","avatar_url":"https://github.com/micheleriva.png","language":"Haskell","readme":"\u003ch1 align=\"center\"\u003e Caesar Cipher \u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cspan align=\"center\"\u003e s i m p l e · h a s k e l l · i m p l e m e n t a t i o n\u003c/span\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"/docs/img.png\" align=\"center\"\u003e\n\u003c/div\u003e\n\u003cbr /\u003e\n\nMy goal with this project was to build a Caesar Cipher with the minimum effort. \u003cbr /\u003e\nWhy? Because I strongly believe that an awesome language such as Haskell, has the potential to transform the following verbose code in something beautiful:\n\n```php\n\u003c?php\nfunction encrypt($str, $offset) {\n    $encrypted_text = \"\";\n    $offset = $offset % 26;\n    if($offset \u003c 0) {\n        $offset += 26;\n    }\n    $i = 0;\n    while($i \u003c strlen($str)) {\n        $c = strtoupper($str{$i}); \n        if(($c \u003e= \"A\") \u0026\u0026 ($c \u003c= 'Z')) {\n            if((ord($c) + $offset) \u003e ord(\"Z\")) {\n                $encrypted_text .= chr(ord($c) + $offset - 26);\n        } else {\n            $encrypted_text .= chr(ord($c) + $offset);\n        }\n      } else {\n          $encrypted_text .= \" \";\n      }\n      $i++;\n    }\n    return $encrypted_text;\n}\n\nfunction decrypt($str, $offset) {\n    $decrypted_text = \"\";\n    $offset = $offset % 26;\n    if($offset \u003c 0) {\n        $offset += 26;\n    }\n    $i = 0;\n    while($i \u003c strlen($str)) {\n        $c = strtoupper($str{$i}); \n        if(($c \u003e= \"A\") \u0026\u0026 ($c \u003c= 'Z')) {\n            if((ord($c) - $offset) \u003c ord(\"A\")) {\n                $decrypted_text .= chr(ord($c) - $offset + 26);\n        } else {\n            $decrypted_text .= chr(ord($c) - $offset);\n        }\n      } else {\n          $decrypted_text .= \" \";\n      }\n      $i++;\n    }\n    return $decrypted_text;\n}\n```\n\nwhy the `hwem` (caesar 2) should I write such an horrible php code when there's Haskell?\n\n# License\n[MIT](/LICENSE.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicheleriva%2Fcaesar-cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicheleriva%2Fcaesar-cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicheleriva%2Fcaesar-cipher/lists"}