A header-only implementation of the Vigenere Cipher in C.
- C 92.3%
- Shell 7.7%
| .gitignore | ||
| build.sh | ||
| main.c | ||
| ReadMe.md | ||
| UNLICENSE | ||
| vigenere.h | ||
Vigenere Cipher
Overview
This program is an implementation of the Vigenere Cipher.
https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
The following steps are performed during encryption:
- Read the encryption key.
- Read the plain text input string.
- Remove all non-alpha characters from the key and plain text input.
- Convert any lower case characters to upper case in key and plain text.
- Apply the cipher.
- Display the encrypted text.
Build
Use the following command to build the program:
./build.sh
Usage
To encrypt a string:
./vigenere -k "KEY" -e "STRING TO ENCRYPT"
The above command returns:
CXPSREDSCXGPITR
To decrypt a string:
./vigenere -k "KEY" -d "CXPSREDSCXGPITR"
The above command returns:
STRINGTOENCRYPT