Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a C++ program 2. Data Security Encryption is an effective way to achieve data security. To read an encrypted file, you must have access

write a C++ program image text in transcribed
2. Data Security Encryption is an effective way to achieve data security. To read an encrypted file, you must have access to a secret key or password that enables you to decrypt it. You are expected to implement a simple encryption/decryption program. The program shall read the text from an input text file character by character (use cin.get() function) and produces an encrypted or decrypted version of the file. Your program shall allow the user to enter either 1 for encryption or 2 for decryption. The encryption procedure is to replace each alphabet by another one and each digit by another digit as follows: character Encrypted character Hint A, B, C, ......X, Y, Z T,U,V,..., Q, R, S Compute the shift from 'A' to 'T', 'a' a, b, c, ........2 n, o, p,...,k,1,m to 'n', and 'O' to 's'. Use the % operator to rotate. 0, 1, 2, 5,6,7,...,3,4 . ...... 9 Other characters are not encrypted. The decryption procedure is to reverse the encryption procedure such that you obtain the original text file. Sample run: Enter your option: 1. to Encrypt the file 2. to Decrypt the file Option : 1 The encryption result of the input file is stored in "enrypted_msg.txt". Process returned @ (exe) execution time : 2.634 s Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions