This program is related to manipulation of strings - reading, writing, extracting substrings and conversion to other data types. It also includes some basic encryption and decryption of information.
In this assignment you will write a program that implement a Text-Encrypter-Decrypter which will do the following algorithms:
1. Read a text line from the "input.txt" file as a string such as: "I love C++".
2. Parse the line into separated letters.
3. Conver them into ASCII numbers.
4. Change those ASCII numbers into binary numbers.
5. Apply the 1st complement at those binary numbers.
6. Reverse the resulting binary numbers of step 5.
7. Write them out to "Encrypted.txt" file.
8. Decrypt the text lines stored in "Encrypted.txt" file back to a text file called "Decrypted.txt".
Example:
Input file data | Encrypted Text | Comments |
1 | 01101101 | Always has 8 bits |
< space > | 11111011 | Your application must read space and new line |
Screenshots: see image.
Decrypted file screenshot: see image.
A new input file will be given during the demo, for which the output has to be submitted. see image.