Changeset 2847 for trunk/phpgwapi/js/expressoAjax
- Timestamp:
- 05/25/10 10:40:13 (14 years ago)
- Location:
- trunk/phpgwapi/js/expressoAjax
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/js/expressoAjax/expressoAjax.js
r2752 r2847 287 287 cConnector.prototype.newRequest = function (id, target, method, handler, data) 288 288 { 289 289 290 _connector.go( { 290 291 "access" : target, … … 295 296 "cache": expresso.connector.cacheRequest 296 297 } ); 298 299 297 300 this.cacheRequest=false; 298 301 }; … … 472 475 expresso.connector.loadScript(module); 473 476 }; 477 478 (function( ) 479 { 480 var sec_key = null; 481 var mod = null; 482 function encode( data ) 483 { 484 var result = ""; 485 var val = ""; 486 var packsize = 3; 487 for (i=0; i < data.length; i+=packsize){ 488 for (j=i; j < i+packsize; j++) 489 if (data.charCodeAt(j) > 1) 490 val += ""+data.charCodeAt(j); 491 else 492 val += "000"; 493 bigVal = int2bigInt(val,50,10); 494 val = ""; 495 bigKey = int2bigInt(sec_key,50,10); 496 bigN = int2bigInt(mod,50,10); 497 bigResult = powMod(bigVal,bigKey,bigN); 498 result += bigInt2str(bigResult,10)+" "; 499 } 500 return result; 501 } 502 503 function crypt( input, modulus ) 504 { 505 sec_key = input; 506 mod = modulus; 507 508 } 509 510 crypt.prototype.encode = encode; 511 window.crypt = crypt; 512 })( ); 513 514 expressoAjax.prototype.crypt = new crypt(keys[0],keys[1]); 515 delete(keys); 516 474 517 var expresso = new expressoAjax();
Note: See TracChangeset
for help on using the changeset viewer.