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


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.


please solve my assignement i am waiting

peter_budo commented: Lazynes is not tolerated. -2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.