https://github.com/phx/caesarcipher
simple caesar cipher w/ encode and decode that can take any number of shifts
https://github.com/phx/caesarcipher
Last synced: about 1 year ago
JSON representation
simple caesar cipher w/ encode and decode that can take any number of shifts
- Host: GitHub
- URL: https://github.com/phx/caesarcipher
- Owner: phx
- Created: 2020-01-13T22:23:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T15:24:06.000Z (almost 5 years ago)
- Last Synced: 2025-01-29T10:33:58.924Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Caesar Cipher
This is code that I modified from a couple of examples in a book to make it more useful.
It takes `STDIN` as input. Except for the bruteforce method, it also allows for case-sensitivity.
In the case of bruteforce, you can usually see the shift used, then pipe the original message in with `echo [message] | ./caesar.py [shift] -d` in order to re-obtain the original case-sensitivity.
### Usage:
`./caesar.py <[# OF SHIFTS] [-e|-d]> | <[--brute]>`
### Examples
`echo 'stuff to encrypt' | ./caesar.py 11 -e`
`echo 'DEFQQ EZ PYNCJAE' | ./caesar.py 11 -d`
`cat decrypted_file.txt | ./caesar.py 3 -e`
`./caesar.py 3 -d < encrypted_file.txt`
`echo 'DEFQQ EZ PYNCJAE' | ./caesar.py --brute`