Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > en- and decrypting

Reply
Thread Tools

en- and decrypting

 
 
checksumde
Guest
Posts: n/a
 
      04-28-2004
Hi Guys,

i've found a small java script function that simple
decrypts some encodedtext to plaintext.

function decrypt(t,k){
var y=0;
var r='';
t=unescape(t);
for (i=0;i<t.length;i++){
x=k.charCodeAt(y);
x2=t.charCodeAt(i);
if(x!=x2){
r=r+String.fromCharCode(x2^x);
}';x+='else{
r=r+String.fromCharCode(x);
}
y++;
if(y==k.length){
y=0;
}
}return(escape(r));
}

the problem is that i don't have the
encrypt function. i tried it by my own,
but i'm a noob using javascript in this way

can somebody help me to write this
encrypt function?


regards
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crypting and decrypting with key public and private strafacile@libero.it Java 0 05-12-2006 04:15 PM
encrypting and decrypting with perl Marshall Dudley Perl Misc 1 01-27-2005 06:14 PM
encrypting and decrypting with perl Marshall Dudley Perl 1 01-27-2005 06:14 PM
Encrypting/Decrypting Connection String VB Programmer ASP .Net 3 11-30-2004 06:08 AM
Error decrypting authentication ticket =?Utf-8?B?QmlsbCBCb3Jn?= ASP .Net 0 10-11-2004 10:59 PM



Advertisments