Skip to content

Commit

Permalink
updated the encryption class. still working on it.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed Aug 8, 2012
1 parent 905b8a6 commit d15b9cc
Show file tree
Hide file tree
Showing 4 changed files with 396 additions and 241 deletions.
32 changes: 32 additions & 0 deletions upload/admin/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/opencart/upload/admin/');
define('HTTP_CATALOG', 'http://localhost/opencart/upload/');
define('HTTP_IMAGE', 'http://localhost/opencart/upload/image/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost/opencart/upload/admin/');
define('HTTPS_CATALOG', 'http://localhost/opencart/upload/');
define('HTTPS_IMAGE', 'http://localhost/opencart/upload/image/');

// DIR
define('DIR_APPLICATION', 'C:\wamp\www\opencart\upload/admin/');
define('DIR_SYSTEM', 'C:\wamp\www\opencart\upload/system/');
define('DIR_DATABASE', 'C:\wamp\www\opencart\upload/system/database/');
define('DIR_LANGUAGE', 'C:\wamp\www\opencart\upload/admin/language/');
define('DIR_TEMPLATE', 'C:\wamp\www\opencart\upload/admin/view/template/');
define('DIR_CONFIG', 'C:\wamp\www\opencart\upload/system/config/');
define('DIR_IMAGE', 'C:\wamp\www\opencart\upload/image/');
define('DIR_CACHE', 'C:\wamp\www\opencart\upload/system/cache/');
define('DIR_DOWNLOAD', 'C:\wamp\www\opencart\upload/download/');
define('DIR_LOGS', 'C:\wamp\www\opencart\upload/system/logs/');
define('DIR_CATALOG', 'C:\wamp\www\opencart\upload/catalog/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'opencart');
define('DB_PREFIX', 'oc_');
?>
30 changes: 30 additions & 0 deletions upload/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
// HTTP
define('HTTP_SERVER', 'http://localhost/opencart/upload/');
define('HTTP_IMAGE', 'http://localhost/opencart/upload/image/');
define('HTTP_ADMIN', 'http://localhost/opencart/upload/admin/');

// HTTPS
define('HTTPS_SERVER', 'http://localhost/opencart/upload/');
define('HTTPS_IMAGE', 'http://localhost/opencart/upload/image/');

// DIR
define('DIR_APPLICATION', 'C:\wamp\www\opencart\upload/catalog/');
define('DIR_SYSTEM', 'C:\wamp\www\opencart\upload/system/');
define('DIR_DATABASE', 'C:\wamp\www\opencart\upload/system/database/');
define('DIR_LANGUAGE', 'C:\wamp\www\opencart\upload/catalog/language/');
define('DIR_TEMPLATE', 'C:\wamp\www\opencart\upload/catalog/view/theme/');
define('DIR_CONFIG', 'C:\wamp\www\opencart\upload/system/config/');
define('DIR_IMAGE', 'C:\wamp\www\opencart\upload/image/');
define('DIR_CACHE', 'C:\wamp\www\opencart\upload/system/cache/');
define('DIR_DOWNLOAD', 'C:\wamp\www\opencart\upload/download/');
define('DIR_LOGS', 'C:\wamp\www\opencart\upload/system/logs/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'opencart');
define('DB_PREFIX', 'oc_');
?>
6 changes: 3 additions & 3 deletions upload/system/helper/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ function json_encode($data) {
$c4 = ord($string[++$i]);

if (($c1 & 8 ) === 0) {
$u = (($c1 & 15) << 2) + (($c2>>4) & 3) - 1;
$u = (($c1 & 15) << 2) + (($c2 >> 4) & 3) - 1;

$w1 = (54<<10) + ($u<<6) + (($c2 & 15) << 2) + (($c3>>4) & 3);
$w2 = (55<<10) + (($c3 & 15)<<6) + ($c4-128);
$w1 = (54 << 10) + ($u << 6) + (($c2 & 15) << 2) + (($c3 >> 4) & 3);
$w2 = (55 << 10) + (($c3 & 15) << 6) + ($c4 - 128);
$json .= sprintf("\\u%04x\\u%04x", $w1, $w2);
}
}
Expand Down
Loading

0 comments on commit d15b9cc

Please sign in to comment.