A fun command-line tool written in Go that encodes and decodes messages using various ciphers.
To use the tool, you can either download the source code or use the built executable.
Clone the repo: git clone [email protected]:cswn/goCipher.git
Enter the directory: cd goCipher/
Execute the tool: ./goCipher {subcommand} [ARGUMENTS]
-> see Usage
You must have installed Go locally to use the tool this way.
git clone [email protected]:cswn/goCipher.git
cd goCipher/
go run main.go {subcommand} [ARGUMENTS]
-> see Usage
The famous Ceasar cipher, one of the most well-known and simplest encryption techniques. Julius Ceasar is said to have used it himself for private communications. For this cipher, messages are encrypted by shifting the letters along the alphabet according to a numerical key.
Usage:
./goCipher ceasar -m "my secret message" -k 17
Arguments:
-m
The message to encrypt or decrypt. For strings with more than one word, make sure to enclose in quotes.-d
(optional) Decrypt. Set this flag (with no arguments) if you want to decrypt instead of encrypt a message.-k
(optional, default 10) The key, a number.
The classic Vigenère cipher, invented by Giovan Battista Bellaso in 1553 but mistakenly attributed to Blaise de Vigenère in the 16th century after he came up with a similar cipher. In this cipher, messages are encrypted using a secret key and a tabula recta. Because multiple substitution alphabets are used it is known as a 'polyalphabetic' cipher.
Usage:
./goCipher vigenere -m "my secret message" -k "lorem ipsum"
Arguments:
-m
The message to encrypt or decrypt. For strings with more than one word, make sure to enclose in quotes.-k
The key, a string. For strings with more than one word, make sure to enclose in quotes.-d
(optional) Decrypt. Set this flag (with no arguments) if you want to decrypt instead of encrypt a message.