{"id":18439088,"url":"https://github.com/demonstrandum/caesar","last_synced_at":"2025-04-14T13:24:47.608Z","repository":{"id":96636178,"uuid":"87731335","full_name":"Demonstrandum/Caesar","owner":"Demonstrandum","description":"Simple Caesar/rot cipher written in C++","archived":false,"fork":false,"pushed_at":"2017-06-05T15:27:09.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T10:44:54.165Z","etag":null,"topics":["alphabet","c-plus-plus","caesar","cipher","decryption","encryption","rot-cipher","unix"],"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/Demonstrandum.png","metadata":{"files":{"readme":"README.md","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":"2017-04-09T18:48:12.000Z","updated_at":"2017-12-22T12:58:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"0da17ae0-c418-46c9-ab76-fc9deac76fb9","html_url":"https://github.com/Demonstrandum/Caesar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FCaesar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FCaesar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FCaesar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demonstrandum%2FCaesar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Demonstrandum","download_url":"https://codeload.github.com/Demonstrandum/Caesar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248887305,"owners_count":21177849,"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":["alphabet","c-plus-plus","caesar","cipher","decryption","encryption","rot-cipher","unix"],"created_at":"2024-11-06T06:23:19.475Z","updated_at":"2025-04-14T13:24:47.583Z","avatar_url":"https://github.com/Demonstrandum.png","language":"C++","readme":"# Caesar\nSimple Caesar/rot cipher written in C++\n\nTranslates any text given (latin alphabet only) from a command line argument or from a file. Supports and keeps whitespace formatting (tabs, spaces, etc...) as well as special characters (punctuation and such), and guards the capitalisation/case of the letters.\n\n### Installation:\nIn your terminal, clone and cd into the repository:\u003cbr /\u003e\n`git clone https://github.com/Demonstrandum/Caesar \u0026\u0026 cd Caesar`\u003cbr /\u003e\nThen run the make file by typing: `make`\u003cbr /\u003e\nThen `make install`, you might need to do `sudo make install`\u003cbr /\u003e\nYou must have `/usr/local/bin/` in your `$PATH` variable in your shell.\n\n### Usage:\n`caesar \u003cshift (int out of 26)\u003e \u003cinput type(text or file)\u003e \u003cinput (filename or just the text)\u003e`\n1. The first argument is an integer, the rotation (how many letters to shift by) in the alphabet so naturally the range for the integer size is between -26 and 26.\n2. The second argument is how to get the input, either by `text` or from a `file`.\n3. The third argument is either the filename, if you chose `file` for the previous argument or the text you want to encrypt (in quote marks if it contains spaces or special characters).\n\nFor example, encrypting the the alphabet demonstrates what this program does. It shifts the letters in the alphabet over to make the text not immediately recognisable. However the following example shows clearly what it does:\n```shell\ncaesar 1 text abcdefghijklmnopqrstuvwxyz\n```\nShould yield `bcdefghijklmnopqrstuvwxyza`\n\nAnd\n```shell\ncaesar 3 text \"Hello, World!\"\n```\nGives `Khoor, Zruog!`\n```shell\ncaesar 0 text \"This command is useless.\"\n```\n```shell\ncaesar 26 text \"This command is useless.\"\n```\nBoth yield `This command is useless.`\n\nYou can also read from a file for larger translations:\n```shell\ncaesar 4 file myfile.txt\n```\nThis command will translate the contents of `myfile.txt` (supports any file format not just `.txt`) and puts it in the terminal.\u003c/br\u003e\nTo instead put this in another file (creates a new file if it doesn't already exist), type:\n```shell\ncaesar 8 file normaltext.x \u003e encryptedtext.y\n```\nThis will take the contents of `normaltext.x` and spit out the encrypted version of the text into the newly made (or preexisting) `encryptedtext.y`\u003cbr /\u003e\nSame can be done for `text`:\n```shell\ncaesar 19 text \"Some piece of text...\" \u003e ciphered.txt\n```\n### Decryption\nTo decrypt and encrypted message do the opposite if the encryption, so if the rotation for an encrypted message was 7 then to decrypt it rotate by -7.\ne.g.\n```shell\ncaesar 7 text \"Decrypt me.\"\n```\nOutputs `Kljyfwa tl.`,\nso to decrypt it:\n```shell\ncaesar -7 text \"Kljyfwa tl.\"\n```\nWhich will give `Decrypt me.`\nSame for the decryption of a negative rotation encryption, e.g. to decrypt a -12 rotation, rotate by 12 to decrypt.\n\nIf the rotation encryption amount is unknown then you can use brute force to iterate through every possibility; use the argument \"bruteforce\", \"force\" or \"brute\" instead of a rotation amount.\n\nFor example:\n```shell\ncaesar bruteforce text \"Lipps Xlivi\"\n```\nwhich produces a list like this:\n```\n01: Khoor Wkhuh\n02: Jgnnq Vjgtg\n03: Ifmmp Uifsf\n04: Hello There\n05: Gdkkn Sgdqd\n06: Fcjjm Rfcpc\n07: Ebiil Qebob\n08: Dahhk Pdana\n09: Czggj Oczmz\n10: Byffi Nbyly\n11: Axeeh Maxkx\n12: Zwddg Lzwjw\n13: Yvccf Kyviv\n14: Xubbe Jxuhu\n15: Wtaad Iwtgt\n16: Vszzc Hvsfs\n17: Uryyb Gurer\n18: Tqxxa Ftqdq\n19: Spwwz Espcp\n20: Rovvy Drobo\n21: Qnuux Cqnan\n22: Pmttw Bpmzm\n23: Olssv Aolyl\n24: Nkrru Znkxk\n25: Mjqqt Ymjwj\n```\nHere we can see 04 goes to 'Hello There', meaning it has been encrypted by a rotation of 4.\n\nNote there is no '26' rotation on the list, just as there is no '00' as they both just yield the same text.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemonstrandum%2Fcaesar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemonstrandum%2Fcaesar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemonstrandum%2Fcaesar/lists"}