/file-encryptor

C program to encrypt and decrypt a .txt file

Primary LanguageCGNU General Public License v3.0GPL-3.0

DISCLAIMER: THIS PROGRAM SHOULD NOT BE USED WITH FILES CONTAINING SENSITIVE INFORMATION. NO SOPHISTICATED FORM OF ENCRYPTION WAS USED HERE.

Side note: Below all the print statements, I had to flush the buffer with fflush(stdout) so the program would work correctly with unix environments, specifically git bash. If anyone knows how to avoid using those, feel free to make a pull request, thank you.


Run main.c with:

Unix based systems: clear && g++ main.c && ./a.exe
Windows: cls && g++ main.c && a.exe
Replace g++ with the c/c++ compiler you have.

Sample encryption:

File to encrypt -> test_file.txt:



Encrypted file -> encrypted.txt:


Sample decryption:

After decrypting encrypted.txt, the output will be stored in decrypted.txt:

test_file.txt was generated with https://www.plot-generator.org.uk/