Monday, 15 March 2010

javascript - Need decryption script -


I am JavaScript This encryption code and knows the decryption was written in another language, which I do not. But I want to decrypt it in javascript! Anyone can help me on this

  function getEncryptedPassword (STR) {var keyStr = 'ABCDEFGHIJKLMNOP' + 'QRSTUVWXYZabcdef' + 'ghijklmnopqrstuv' + 'wxyz0123456789 + /' + '=' . Var unEncPw = escape (str), output = '', i = 0; Var chr1, chr2, chr3 = ''; Var Anak 1, Enque 2, Enque 3, Enque 4 = '; Do {chr1 = unEncPw.charCodeAt (i ++); Chr2 = unEncPw.charCodeAt (i ++); Chr3 = unEncPw.charCodeAt (i ++); Enc1 = chr1 & gt; & Gt; 2; Enque 2 = ((chr1 and 3) & lt; <4). (Chr2 & gt; & gt; 4); Enque 3 = ((chr2 and 15) & lt; <2). (Chr 3 & gt; & gt; 6); Enc 4 = Chris 3 & amp; 63; If (isNaN (chr2)) {enc3 = enc4 = 64; } Else if (isNaN (chr3)) {enc4 = 64; } Output = Outlook + Chabil. Chattat (AF1) + Chicrocracker Art (Anch 2) + Chistrates. ART AT 3 (AX 3) + Chaisretchart ET (Ank 4); Chr1 = chr2 = chr3 = ''; Enc1 = enc2 = enc3 = enc4 = ''; } While (i & lt; unEncPw.length); Return output; }   

Thanks in advance!

Your "encryption" just turned as Base64 This encryption is not at all ... just Another encoding

You can encode / decode base64 in JS. Check here:

No comments:

Post a Comment