Question: Write a program called crypto.js that encrypts passwords containing uppercase/lowercase characters, digits, and special characters. Use Pizza2Day! For the password. See Sample Execution Below: This
Write a program called crypto.js that encrypts passwords containing uppercase/lowercase characters, digits, and special characters. Use Pizza2Day! For the password.
See Sample Execution Below:
This program will encrypt user passwords.
Password: Pizza2Day! Encrypting
Encrypted Password: Njaam2Fmc!
The encryption key to use is below:
| Original Value | Encrypted Value |
| a | m |
| b | h |
| c | t |
| d | f |
| e | g |
| f | k |
| g | b |
| h | p |
| i | j |
| j | w |
| k | e |
| l | r |
| m | q |
| n | s |
| o | l |
| p | n |
| q | i |
| r | u |
| s | o |
| t | x |
| u | z |
| v | y |
| w | v |
| x | d |
| y | c |
| z | a |
Hint: Think how you could represent the encrypted value with an array and the decrypted value as the index position of the array. A dictionary would be a better approach.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
