*USING JAVASCRIPT* Encryption algorithms are commonly used today to provide security.  They transform sensitive data, making it unreadable to hackers. Modern encryption algorithms are quite sophisticated, often employing random number generators.  For this project, we will create a very simple encryption algorithm which will allow us to practice using some of the methods that come with the String class. Read Chapter 2 pages 70-92 and study the program "StringMethods.java" given with this assignment to see how to use some of the methods that come with the String class.  Also, study the program "StudentInfo.java" given with this assignment to see how to use the methods that come with the Scanner class to read data input.  Now create a new project named Chap2-Encryption.  Create a new class named Encryption and **add code to do the following:** Ask the user to enter a password that is 8-20 alphanumeric characters (letters & numbers only for simplicity) and assume it was entered correctly Next, study pages 40, 74, 572 and 576-577 and use some of the String methods described on these pages to perform simple encryption on the password as follows: add the string "bentleymajor" to the beginning of the password replace each vowel character (a, e, i, o, u) to a unique non-alphanumeric character (non-letter, non-number) replace each digit character (0 - 9) to a unique non-alphanumeric character (non-letter, non-number) print the encrypted password now decrypt the password by performing the reverse of the operations performed above print the decrypted password (original password)   Hint:  You will need to use string methods replace(), substring(), and length() for encrypting and decrypting the password.  See pages 74, 572, and 576-577 for information on these methods. Here is a sample output: Enter a password that contains 8-20 alphanumeric characters:  LetsGoFalcons2023 ...encrypting the password... Your encrypted password is:  b@ntl@ym!j$rL@tsG$F!lc$ns*^*( ...decrypting the password... Your decrypted password is:  LetsGoFalcons2023

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

*USING JAVASCRIPT*

Encryption algorithms are commonly used today to provide security.  They transform sensitive data, making it unreadable to hackers. Modern encryption algorithms are quite sophisticated, often employing random number generators.  For this project, we will create a very simple encryption algorithm which will allow us to practice using some of the methods that come with the String class.

Read Chapter 2 pages 70-92 and study the program "StringMethods.java" given with this assignment to see how to use some of the methods that come with the String class.  Also, study the program "StudentInfo.java" given with this assignment to see how to use the methods that come with the Scanner class to read data input. 

Now create a new project named Chap2-Encryption.  Create a new class named Encryption and **add code to do the following:**

  • Ask the user to enter a password that is 8-20 alphanumeric characters (letters & numbers only for simplicity) and assume it was entered correctly
  • Next, study pages 40, 74, 572 and 576-577 and use some of the String methods described on these pages to perform simple encryption on the password as follows:
    • add the string "bentleymajor" to the beginning of the password
    • replace each vowel character (a, e, i, o, u) to a unique non-alphanumeric character (non-letter, non-number)
    • replace each digit character (0 - 9) to a unique non-alphanumeric character (non-letter, non-number)
    • print the encrypted password
    • now decrypt the password by performing the reverse of the operations performed above
    • print the decrypted password (original password)
  •  

Hint:  You will need to use string methods replace(), substring(), and length() for encrypting and decrypting the password.  See pages 74, 572, and 576-577 for information on these methods.

Here is a sample output:

Enter a password that contains 8-20 alphanumeric characters:  LetsGoFalcons2023

...encrypting the password...

Your encrypted password is:  b@ntl@ym!j$rL@tsG$F!lc$ns*^*(

...decrypting the password...

Your decrypted password is:  LetsGoFalcons2023

Expert Solution
Step 1: Required

Editable code, code screenshot and output screenshot.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education