Lightweight file encryption and decryption utility
PME is a lightweight file encryption and decryption command line utility. It's written in C++ and uses only Standard Library calls so there are no external depencies. PME has been built and tested on Windows 10 and Ubuntu on x86 architecture. Built with Gnu gcc.
In this repository you'll find:
- C++ source code
- Simple build script
- Test example
- pme infile outfile password
- infile input file to be encrypted or decrypted
- outfile output file
- password key used to encrypt or decrypt a file
- Run make.bat (simple 1-liner, runs on both Windows and Linux)
- Run test.bat (Windows) or test.sh (Linux)
- Encrypts test_plain.txt to create test_enc.txt
- Decrypts test_enc.txt creating test_dec.txt
- Verifies by comparing test_dec.txt to test_plain.txt
- Encrypt a plain unecnrypted file
- pme myfile_plain.pdf myfile_enc.dat mypassword
- Now decrypt it
- pme myfile_enc.dat myfile_dec.pdf mypassword
- Finally, verify integrity of decrypted file
- diff -bwcs --binary myfile_plain.pdf myfile_dec.pdf
Written with StackEdit.