Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

IN JAVA

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago