Text Encryption & Decryption String letters = abcdefghijklmnopqrstuvwxyz; String enc = kngcadsxbvfhjtiumylzqropwe; For example, every 'a' becomes
Question:
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.
Physics
ISBN: 978-0077339685
2nd edition
Authors: Alan Giambattista, Betty Richardson, Robert Richardson