This is an encryption and decryption tool that can convert a message into a secret-code consisting of just 0s and 1s.
- This tool encrypts a message in the shortest way possible using the Huffman Coding Algorithm, which enhances its memory efficiency.
- The tool also has a decryptor, which makes it possible to decrypt a secret-code with its appropriate key data.
- Cross-platform and no extra library is used
The tool contains two compilable C++ files, one for encryption and the other for decryption.
- You can compile the C++ files using c++17 or a newer standard. No additional flag is needed.
- Compiled and run in a terminal, the encrypt.cpp file produces two output files - encrypted_message.txt and key.txt according to the input message it takes.
- Compiled and run in a terminal, the encrypt.cpp file takes two standard inputs - the encrypted message (secret-code) and the key of it. After that, it outputs the original message in stdout.
- Encryptor: O(klogk), except the reading and writing processes (k is the number of different characters in the given message)
- Decryptor: O(n) (n is the length of the secret-code)
- Encryptor: O(m) (m is the length of the message given)
- Decryptor: O(n) (n is the length of the secret-code)