{"id":19594493,"url":"https://github.com/schlopp96/mycaesarcipher","last_synced_at":"2026-02-08T03:31:55.760Z","repository":{"id":57663793,"uuid":"480603731","full_name":"schlopp96/MyCaesarCipher","owner":"schlopp96","description":"Substitution-based cryptographic cipher for encoding plaintext. Works with alphanumeric characters.","archived":false,"fork":false,"pushed_at":"2024-07-16T05:55:42.000Z","size":56,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-03T04:47:38.185Z","etag":null,"topics":["caesar-cipher","caesar-cipher-algorithm","caesar-shift","cipher","cryptography","decode","decryption","encode","encoder-decoder","encryption","python","python-script","python3","shift-cipher"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schlopp96.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":"2022-04-12T00:57:05.000Z","updated_at":"2023-01-31T19:44:25.000Z","dependencies_parsed_at":"2024-07-16T08:02:23.211Z","dependency_job_id":"bec60a1e-4a0e-49ba-82d9-5ff26a88a429","html_url":"https://github.com/schlopp96/MyCaesarCipher","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlopp96%2FMyCaesarCipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlopp96%2FMyCaesarCipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlopp96%2FMyCaesarCipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlopp96%2FMyCaesarCipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schlopp96","download_url":"https://codeload.github.com/schlopp96/MyCaesarCipher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787487,"owners_count":20020099,"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":["caesar-cipher","caesar-cipher-algorithm","caesar-shift","cipher","cryptography","decode","decryption","encode","encoder-decoder","encryption","python","python-script","python3","shift-cipher"],"created_at":"2024-11-11T08:43:43.504Z","updated_at":"2026-02-08T03:31:55.731Z","avatar_url":"https://github.com/schlopp96.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyCaesarCipher\n\n\u003e Simple cryptographic substitution-based cipher for encoding plaintext.\n\n---\n\n## About\n\n- The [Caesar Cipher](https://en.wikipedia.org/wiki/Caesar_cipher) is one of the most simple and well-known encryption techniques.\n\n  - Each letter in the plaintext entry is replaced by a letter found at a certain number of positions down the alphabet.\n\n- This project was created as an exercise while I was taking the [\"Cracking Codes with Python\"](https://inventwithpython.com/cracking/) course - which I _highly_ recommend for both beginners and experienced Python programmers interested in cryptography!\n\n---\n\n## Installation\n\n### Using pip _(Recommended)_\n\n\u003e **_Easiest_ method.**\n\u003e _Highly recommended over manual installation._\n\n- Run the following to install _**`MyCaesarCipher`**_ using `pip`:\n\n  - ```python\n    pip install MyCaesarCipher\n    ```\n\n- You should now be able to import/run _**`MyCaesarCipher`**_ within your Python environment by entering the following:\n\n  - ```python\n    \u003e\u003e\u003e from MyCaesarCipher import CaesarCipher\n    ...\n    ```\n\n- Done!\n\n---\n\n### Manual Installation\n\n\u003e **_Not_ recommended.**\n\u003e _Only use this method if you are unable to install using `pip`_.\n\n1. Before use, navigate to the intended installation location, and create a new directory.\n\n2. Please only do one of the following:\n\n    - **A.** Clone repository with the git client of your preference.\n    - **B.** Download and extract the source code `zip` archive from the [\"releases\"](https://github.com/schlopp96/MyCaesarCipher/releases) page to the newly created directory.\n\n3. Install all dependencies for this package within the installation directory using the following command:\n\n    - ```python\n      pip install -r requirements.txt\n      ```\n\n4. _**(Optional)**_ move the installation directory to **`\"~Python/Libs/site_packages/\"`** to be able to import this package to a Python environment like any other importable package.\n\n- Done!\n\n---\n\n## Usage\n\n- Within a Python environment or **`.py`** project, simply import the _**`MyCaesarCipher`**_ module to start encryption/decryption of ciphers.\n\n### Text Encryption\n\n- For encrypting text, use the **`CaesarCipher.encrypt`** class method:\n\n  - ```python\n    \u003e\u003e\u003e from MyCaesarCipher import CaesarCipher\n\n    \u003e\u003e\u003e cipher = CaesarCipher() # Create new class instance.\n    \u003e\u003e\u003e txt = 'Test Cipher'\n    \u003e\u003e\u003e cipher.encrypt(text=txt, key=15, stdout_output=True)\n\n    ------------------------------------\n\n    \u003e Original Txt : Test Cipher\n\n    \u003e Shift-Key : 15\n\n    \u003e Encrypted Result: Ithi Rxewtg\n    ```\n\n- Therefore the final encrypted result of \"Test Cipher\" using a shift key of 15 is:\n\n  - \"**`Ithi Rxewtg`**\".\n\n- Note that the `key` parameter is _optional_, and if not provided, a random key between 1 and 25 will be generated:\n\n  - ```python\n    \u003e\u003e\u003e cipher.encrypt('Test Cipher', stdout_output=True)\n\n    ------------------------------------\n\n    \u003e Original Txt : Test Cipher\n\n    \u003e Shift-key : 19\n\n    \u003e Encrypted Result: Mxlm Vbiaxk\n    ```\n\n    ---\n\n  - ```python\n    \u003e\u003e\u003e cipher.encrypt('Test Cipher', stdout_output=True)\n\n    ------------------------------------\n\n    \u003e Original Txt : Test Cipher\n\n    \u003e Shift-key : 24\n\n    \u003e Encrypted Result: Rcqr Agnfcp\n    ```\n\n    ---\n\n  - ```python\n    \u003e\u003e\u003e cipher.encrypt('Test Cipher', stdout_output=True)\n\n    ------------------------------------\n\n    \u003e Original Txt : Test Cipher\n\n    \u003e Shift-key : 4\n\n    \u003e Encrypted Result: Xiwx Gmtliv\n    ```\n\n---\n\n### Text Decryption\n\n- For decrypting text, use the **`CaesarCipher.decrypt`** class method:\n\n  - ```python\n    \u003e\u003e\u003e from MyCaesarCipher import CaesarCipher\n\n    \u003e\u003e\u003e cipher = CaesarCipher() # Create new class instance.\n    \u003e\u003e\u003e decryption = cipher.decrypt(text='Ozno Xdkczm', stdout_output=True)\n\n    ------------------------------------\n\n    \u003e Decrypted Shift-Key 0 : Ozno Xdkczm\n\n    \u003e Decrypted Shift-Key 1 : Nymn Wcjbyl\n\n    \u003e Decrypted Shift-Key 2 : Mxlm Vbiaxk\n\n    \u003e Decrypted Shift-Key 3 : Lwkl Uahzwj\n\n    \u003e Decrypted Shift-Key 4 : Kvjk Tzgyvi\n\n    \u003e Decrypted Shift-Key 5 : Juij Syfxuh\n\n    \u003e Decrypted Shift-Key 6 : Ithi Rxewtg\n\n    \u003e Decrypted Shift-Key 7 : Hsgh Qwdvsf\n\n    \u003e Decrypted Shift-Key 8 : Grfg Pvcure\n\n    \u003e Decrypted Shift-Key 9 : Fqef Oubtqd\n\n    \u003e Decrypted Shift-Key 10 : Epde Ntaspc\n\n    \u003e Decrypted Shift-Key 11 : Docd Mszrob\n\n    \u003e Decrypted Shift-Key 12 : Cnbc Lryqna\n\n    \u003e Decrypted Shift-Key 13 : Bmab Kqxpmz\n\n    \u003e Decrypted Shift-Key 14 : Alza Jpwoly\n\n    \u003e Decrypted Shift-Key 15 : Zkyz Iovnkx\n\n    \u003e Decrypted Shift-Key 16 : Yjxy Hnumjw\n\n    \u003e Decrypted Shift-Key 17 : Xiwx Gmtliv\n\n    \u003e Decrypted Shift-Key 18 : Whvw Flskhu\n\n    \u003e Decrypted Shift-Key 19 : Vguv Ekrjgt\n\n    \u003e Decrypted Shift-Key 20 : Uftu Djqifs\n\n    \u003e Decrypted Shift-Key 21 : Test Cipher # \u003c-- Correct Result\n\n    \u003e Decrypted Shift-Key 22 : Sdrs Bhogdq\n\n    \u003e Decrypted Shift-Key 23 : Rcqr Agnfcp\n\n    \u003e Decrypted Shift-Key 24 : Qbpq Zfmebo\n\n    \u003e Decrypted Shift-Key 25 : Paop Yeldan\n    ```\n\n- The **`CaesarCipher.decrypt`** method will return all possible shifted-key variations of the given encrypted text as a dictionary.\n  - This is NOT printed to stdout even if the `stdout_output` parameter is set to `True`.\n\n  - ```python\n    {'Ozno Xdkczm': 0, 'Nymn Wcjbyl': 1, 'Mxlm Vbiaxk': 2, 'Lwkl Uahzwj': 3, 'Kvjk Tzgyvi': 4, 'Juij Syfxuh': 5, 'Ithi Rxewtg': 6, 'Hsgh Qwdvsf': 7, 'Grfg Pvcure': 8, 'Fqef Oubtqd': 9, 'Epde Ntaspc': 10, 'Docd Mszrob': 11, 'Cnbc Lryqna': 12, 'Bmab Kqxpmz': 13, 'Alza Jpwoly': 14, 'Zkyz Iovnkx': 15, 'Yjxy Hnumjw': 16, 'Xiwx Gmtliv': 17, 'Whvw Flskhu': 18, 'Vguv Ekrjgt': 19, 'Uftu Djqifs': 20, 'Test Cipher': 21, 'Sdrs Bhogdq': 22, 'Rcqr Agnfcp': 23, 'Qbpq Zfmebo': 24, 'Paop Yeldan': 25}\n    ```\n\n- **_Generally_**, the _most legible_ key output will be the correct decrypted text (assuming the encrypted text was legible initially).\n\n- Regardless, the correct output **MUST** be one of the output values due to the limitations of the algorithm being tied to the length of the alphabet [26] and the number of possible integers [0-9].\n  - This is also the reason why the algorithm is not recommended for serious real-world cryptography use cases, as it is rather simple to decipher Caesar-Cipher encrypted text.\n\n---\n\n## Contact\n\n- If you have any questions, comments, or concerns that cannot be alleviated through the [project's GitHub repository](https://github.com/schlopp96/MyCaesarCipher), please feel free to contact me through my email address:\n\n  - `schloppdaddy@gmail.com`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschlopp96%2Fmycaesarcipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschlopp96%2Fmycaesarcipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschlopp96%2Fmycaesarcipher/lists"}