aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-base/www/include/share
diff options
context:
space:
mode:
authorM.Gergo2020-01-12 12:53:59 +0100
committerM.Gergo2020-01-12 12:53:59 +0100
commit7891f65fb7544f3b1a126f8e0688889d6a6954f3 (patch)
tree9c5a1122a1e3aba3de81f888dafed14a1cb78282 /mayor-orig/mayor-base/www/include/share
parent502843a035833f82321ed990ada1eda23612ed92 (diff)
downloadmayor-rev4589.tar.gz
mayor-rev4589.zip
Rev: 4589rev4589
Diffstat (limited to 'mayor-orig/mayor-base/www/include/share')
-rw-r--r--mayor-orig/mayor-base/www/include/share/ssl/ssl.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/mayor-orig/mayor-base/www/include/share/ssl/ssl.php b/mayor-orig/mayor-base/www/include/share/ssl/ssl.php
index 61b6ca1b..c8aaba2d 100644
--- a/mayor-orig/mayor-base/www/include/share/ssl/ssl.php
+++ b/mayor-orig/mayor-base/www/include/share/ssl/ssl.php
@@ -187,7 +187,9 @@ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzAB
if (function_exists('mcrypt_encrypt')) {
$return = mcrypt_encrypt(MCRYPT_RIJNDAEL_128,$key,$data,MCRYPT_MODE_CBC,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
} else {
- $_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
+ $return = openssl_encrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ // $return = openssl_decrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ //$_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
}
return base64_encode($return);
}
@@ -201,7 +203,9 @@ function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzAB
if (function_exists('mcrypt_decrypt')) {
$return = mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$data,MCRYPT_MODE_CBC,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
} else {
- $_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
+ // $return = openssl_encrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ $return = openssl_decrypt($data, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
+ // $_SESSION['alert'][] = 'info:mcrypt függvény nem található (tipp! telepítsd a php5-mcrypt csomagot a szerverre)';
}
return trim(urldecode($return));
}