{"id":26737449,"url":"https://github.com/fahadelahikhan/caesar-cipher","last_synced_at":"2025-03-28T02:50:48.840Z","repository":{"id":274762620,"uuid":"849468011","full_name":"fahadelahikhan/Caesar-Cipher","owner":"fahadelahikhan","description":"Simple python script to encode or decode any entered text from the terminal.","archived":false,"fork":false,"pushed_at":"2025-03-13T09:11:24.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T10:22:16.815Z","etag":null,"topics":["ceasar-cipher","cipher","cipher-algorithms","encryption-decryption","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/fahadelahikhan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-29T16:44:11.000Z","updated_at":"2025-03-13T09:11:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"0eab5069-e448-4b0a-b77d-0881d073b211","html_url":"https://github.com/fahadelahikhan/Caesar-Cipher","commit_stats":null,"previous_names":["fahadelahikhan/caesar-cipher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahadelahikhan%2FCaesar-Cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahadelahikhan%2FCaesar-Cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahadelahikhan%2FCaesar-Cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fahadelahikhan%2FCaesar-Cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fahadelahikhan","download_url":"https://codeload.github.com/fahadelahikhan/Caesar-Cipher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245960690,"owners_count":20700780,"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":["ceasar-cipher","cipher","cipher-algorithms","encryption-decryption","python3"],"created_at":"2025-03-28T02:50:48.214Z","updated_at":"2025-03-28T02:50:48.830Z","avatar_url":"https://github.com/fahadelahikhan.png","language":"Python","readme":"# Caesar Cipher 🔒\r\n\r\n![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)\r\n![License](https://img.shields.io/badge/license-MIT-green)\r\n\r\nA Python implementation of the classic Caesar Cipher for basic text encryption and decryption.\r\n\r\n## 📜 About\r\nThe Caesar Cipher is one of the simplest and most widely-known encryption techniques. It works by shifting each letter in the plaintext by a fixed number of positions in the alphabet. This implementation provides a foundation for understanding basic cryptographic concepts.\r\n\r\n## ✨ Features\r\n- Encrypt and decrypt text using a shift-based cipher\r\n- Handles both uppercase and lowercase letters\r\n- Preserves non-alphabetic characters\r\n- Simple command-line interface\r\n- Automatic shift normalization for values over 26\r\n\r\n## 🚀 Quick Start\r\n\r\n### Installation\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/fahadelahikhan/Caesar-Cipher.git\r\n   cd Caesar-Cipher\r\n   ```\r\n\r\n2. Run the application:\r\n   ```bash\r\n   python Caesar_Cipher.py\r\n   ```\r\n\r\n### Basic Usage\r\n```python\r\n# Import the caesar function\r\nfrom caesar_cipher import caesar\r\n\r\n# Encrypt a message\r\nencrypted = caesar(start_text=\"hello\", shift_amount=3, cipher_direction=\"encode\")\r\n# Output: Your encoded text is: khoor\r\n\r\n# Decrypt a message\r\ndecrypted = caesar(start_text=\"khoor\", shift_amount=3, cipher_direction=\"decode\")\r\n# Output: Your decoded text is: hello\r\n```\r\n\r\n### Example Encryption\r\n```python\r\n# Encrypt a secret message\r\nmessage = \"meet me after class\"\r\nshift = 5\r\nencrypted_message = caesar(message, shift, \"encode\")\r\nprint(encrypted_message)  # Output: rjjy rj fiyhw hqfxx\r\n\r\n# Decrypt the message\r\ndecrypted_message = caesar(encrypted_message, shift, \"decode\")\r\nprint(decrypted_message)  # Output: meet me after class\r\n```\r\n\r\n## 📖 How It Works\r\nThe Caesar Cipher works by:\r\n1. Taking each letter in the plaintext\r\n2. Shifting it by a specified number of positions in the alphabet\r\n3. Wrapping around using modulo 26 arithmetic\r\n4. Non-alphabetic characters are left unchanged\r\n\r\nThe encryption formula can be represented as:\r\n```\r\nE(x) = (x + n) mod 26\r\n```\r\nWhere `x` is the position of the letter in the alphabet and `n` is the shift amount.\r\n\r\n## ⚖️ License\r\nDistributed under the MIT License. See [LICENSE](LICENSE) for details.\r\n\r\n---\r\n\r\n\u003e **Note**: The Caesar Cipher is not secure for modern cryptographic needs. Use this implementation for educational purposes only.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahadelahikhan%2Fcaesar-cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffahadelahikhan%2Fcaesar-cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffahadelahikhan%2Fcaesar-cipher/lists"}