Changeset 2847 for trunk/phpgwapi
- Timestamp:
- 05/25/10 10:40:13 (14 years ago)
- Location:
- trunk/phpgwapi
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.common.inc.php
r2846 r2847 392 392 $webserver_url .= '/'; 393 393 394 require_once('class.rsa.inc.php'); 395 $rsa = new rsa(); 394 396 $expressolivre = CreateObject( 'phpgwapi.expressolivre' ); 395 397 … … 398 400 . 'var template = "' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ] . '";' 399 401 . 'var ExpressoLivre = function ExpressoLivre( ) { return String( \'' . $expressolivre -> configuration( ) . '\' ); };' 402 . 'keys = ['.$rsa->get_publKey().','.$rsa->get_mod().'];' 400 403 . '</script>'; 401 404 402 405 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'wz_dragdrop', 'wz_dragdrop', NULL, true ); 403 406 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressoAjax', 'expressoAjax', NULL, true ); 407 408 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressoAjax', 'bigInt', NULL, true ); 409 404 410 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressoAjax', 'dom', NULL, true ); 405 411 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressolivre','expressolivre', NULL, true ); -
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.