C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Javascript »

Encryption and Decryption using JavaScript


Posted Date: 03 Jul 2009    Resource Type: Code Snippets    Category: Javascript
Author: ManigandanMember Level: Gold    
Rating: 1 out of 5Points: 5



HI,

Here is the Interesting Coding for Encryption and Decryption using JavaScript.
In our Friends Circle we are using This for a Privacy...
It is very useful.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<SCRIPT LANGUAGE="JavaScript">
<!--

var letters = 'ghijklabvwxyzABCDEFef)_+|<>?:mnQRSTU~!@#$%^VWXYZ`1234567opGHIJKLu./;'+"'"+'[]MNOP890-='+'\\'+'&*("{},cdqrst '+"\n";var split = letters.split("");var num = '';var c = '';var encrypted = '';function encrypt(it){var b = '0';var chars = it.split("");while(b= letters.length){num = eval(10-(letters.length-c));encrypted += split[num];}else{num = eval(c+10);encrypted += split[num];}}c++;}b++;}document.forms[0].data.value = encrypted;encrypted = '';}function decrypt(it){var b = '0';var chars = it.split("");while(b -->
</SCRIPT>
<title>Untitled Page</title>
</head>


Now you can Add the code in the Form tag:

<FORM>
<TEXTAREA ROWS="9" COLS="60" NAME="data" wrap="virtual"></TEXTAREA><BR>
<INPUT TYPE="BUTTON" VALUE="Encrypt" onClick="encrypt(document.forms[0].data.value)">
<INPUT TYPE="BUTTON" VALUE="Decrypt" onClick="decrypt(document.forms[0].data.value)">
</FORM>



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Encryption and Decryption using JavaScript  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Dynamic Color Changing Background Using JavaScript
Previous Resource: SlideShow of Images while MouseOver using JavaScript
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use