Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to come up with an Android app using Android studio that that encrypts messages using a simple substitution cipher. Entry Text: message to
I need to come up with an Android app using Android studio that that encrypts messages using a simple substitution cipher.
Entry Text: message to be encoded.
This input should be a nonempty string and must contain at least one letter or number.
This input should be provided to the app through an EditText widget, initially blank.
Case : first encryption parameter.
This input should be an integer coprime to between and :
This input should be provided to the app through an EditText widget, initially set to
Statement: second encryption parameter.
This input should be an integer and
This input should be provided to the app through an EditText widget, initially set to
Example:
Text Encrypted, the text resulting from applying the following cipher:
Each character in the alphabet is assigned a numeric value between and based on its position in the alphabet ieABZabz Note that the alphabet contains letters and numbers.
For each character in the alphabet, where the numeric value is x the encoded value of the letter is defined as Exax b where a and b are the values of Arg Input and Arg Input respectively, as in an Affine Cipher.
The encoded character for the input character is calculated by taking the encoded number, which is a value between and and translating it back into a character again where ABZabz
All nonalphanumeric characters must remain unchanged.
The output should be shown using a noneditable TextView that is initially blank and recomputed when the "Encrypt Entry Text" button is pressed. If any input is invalid when the button is pressed, the output should then be set to ie the empty string and all applicable error messages should be generated see below
The sample is included below
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started