Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that performs text encryption and decryption on a certain input string. First, ask the user to input a string. Then, ask the

image text in transcribed

Write a program that performs text encryption and decryption on a certain input string. First, ask the user to input a string. Then, ask the user for an encryption parameter, between 1 and 30. Write a separate Class named "EncryptionHelper This class has a static function called "Encrypt". This function accepts a String parameter, and an integer parameter. The Encrypt function iterates over each character of the input string that is passed to it. It converts each character to it's corresponding integer value in the ASCII table, and then subtracts the given encryption parameter from that number. Finally, the resulting number is converted back to a char and the sequence of characters is put together to create the encrypted string. The class Encryption Helper should also provide a function called "Decrypt". This function also accepts a string and an integer parameter, and reverses the process, to create clear text out of an encrypted string

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

Step: 3

blur-text-image

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions