InstructionsView more random threads:
- Mcs cs402 1st assignment
- Write an eassay on Wireless Technologies
- MGT 111 Fall 2011 Assignment Solution Due 14 1 2011
- MGT301 assignment no 1
- Eng 201 2nd Assignment
- Mcm304
- PlzzzZZZZZ SolVe This ASssignmnt...PlzzzZZZZ urGentLy...
- phy301 Assignment#5 spring 2011 need solution plz share?
- CS501 Assignment #3
- cs401 assignment no 3 solution required
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:
o Assignment is submitted after due date.
o Submitted assignment does not open or file is corrupt or in invalid format.
o Complete assignment or part of assignment is copied (From internet or to/from students).
Objective
The objective of this assignment is to understand the concept of encryption (encoding and decoding).
Assignment Submission Instructions
• Assignment should be submitted in only html format.
• On submitting any other format. Zero mark will be awarded.
• You should work only on the given html file.
Assignment
The task is very simple; you have to work on two functions Encrypt and Decrypt. The encrypt function will encrypt the user input string with the help of encryption key. The decrypt function will decrypt the user input string with the help of encryption key. The output will
Sponsored Links
Hints:
Encoding:
Read each character of user input and find its ASCII code using function charCodeAt. Add the key value into ASCII code of each character and covert new ASCII code to character by using function fromCharCode. Display all characters into Encoded Output box.
For example, you entered a character ‘X’, which has ASCII value 130. Add key value in 130, for example, 130+16=146. Then convert 146 to respective Character.
Decoding:
Read each character of user input and find its ASCII code using function charCodeAt. Subtract the key value from ASCII code of each character and covert new ASCII code to character by using function fromCharCode. Display all characters into Original String box.
There are currently 1 users browsing this thread. (0 members and 1 guests)