Changeset 1880 for sandbox/filemanager/js/common_functions.js
- Timestamp:
- 12/22/09 09:24:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/js/common_functions.js
r1874 r1880 75 75 } 76 76 } 77 function crypt(data1,data2){ 78 ret = ""; 79 for (var i=0;i < data1.length; i++) 80 { 81 ret += String.fromCharCode(data1.charCodeAt(i) ^ data2.charCodeAt(i)); 82 } 83 return ret; 84 } 77 78 (function( ) 79 { 80 var sec_key = null; 81 function encode( data ) 82 { 83 if (data == null) 84 return null; 85 ret = ""; 86 for ( var i=0;i < data.length; i++ ) 87 { 88 ret += String.fromCharCode(data.charCodeAt(i) ^ sec_key.charCodeAt(i)); 89 } 90 return ret; 91 } 92 93 function crypt( input ) 94 { 95 sec_key = input; 96 } 97 98 crypt.prototype.encode = encode; 99 window.crypt = crypt; 100 })( ); 101 85 102 /* 86 103 * base64.js - Base64 encoding and decoding functions
Note: See TracChangeset
for help on using the changeset viewer.