Question: Text Encryption & Decryption String letters = abcdefghijklmnopqrstuvwxyz; String enc = kngcadsxbvfhjtiumylzqropwe; For example, every 'a' becomes a 'k' when encoding a text, and every

Text Encryption & Decryption

String letters = "abcdefghijklmnopqrstuvwxyz";

String enc = "kngcadsxbvfhjtiumylzqropwe";
For example, every 'a' becomes a 'k' when encoding a text, and every 'k' becomes an 'a' when

decoding.

Your program encodes (Encrypt) or decodes (Decrypt) given text using the mapping above. Capital letters are mapped the same way as the lower case letters above, but remain capitalized. For example, every 'A' becomes 'K' when encoding a text and every 'K' becomes an 'A' when decoding. Numbers and other characters are not encoded and remain the same.

Write a program:
1. Gets an input (word, sentence, paragraph ...) from the user and encodes it to an encrypted format.

2. Gets an encrypted text and decode to the original text.

Step by Step Solution

3.47 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To tackle the problem of text encryption and decryption based on a simple character mapping you can follow these steps to write a program Step 1 Creat... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!