Skip to content

Jo-erl/File-Encryption-Decryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

File Encryption x Decryption

Caesar cipher encryption and decryption program in C++. The Caesar cipher is a simple substitution cipher where each letter in the plaintext is shifted a certain number of positions down or up the alphabet.
This is a basic implementation for educational purposes and may not be suitable for secure encryption in real-world scenarios. To make the code suitable for secure encryption in real-world scenarios, you'll need to go beyond simple algorithms like the Caesar cipher and incorporate more robust encryption techniques.

Application

Follow the prompts to provide the input file, output file, shift value, and choice of encryption or decryption. The program will encrypt or decrypt the file accordingly and provide a success message.

Input File: This is the name of the text file that you want to encrypt or decrypt. The program will read the contents of this file and perform the encryption or decryption operation on it. You need to provide the name of the input file when prompted.

Output File: This is the name of the text file where you want to save the encrypted or decrypted result. The program will write the modified text to this file. You need to provide the name of the output file when prompted.

Shift Value: This is the key for the Caesar cipher algorithm. It determines the number of positions by which each letter in the text will be shifted. For example, if you choose a shift value of 3, 'A' will be encrypted as 'D', 'B' as 'E', and so on. When decrypting, the shift value should be the same as the one used for encryption. You need to provide the shift value when prompted.

Choice of Encryption or Decryption: This input determines whether you want to encrypt or decrypt the input file. You can enter 'E' or 'e' to choose encryption or 'D' or 'd' to choose decryption. Any other input will be considered invalid, and the program will exit without performing any operations.

Once you provide the necessary inputs, the program will read the content of the input file, perform the encryption or decryption based on your choice, and save the result in the output file.

Remember, this is a basic example, and the program assumes that the input file exists and is in a valid format. It's essential to handle error cases and incorporate additional checks for file existence, input validation, and error handling to make the program more robust.

License

This project is licensed under the MIT License.

About

Encryption / Decryption with Caesar cipher encryption and decryption program in C++.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages