uawdijnntqw1x1x1
IP : 3.145.108.40
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.trash
/
install.2
/
..
/
tybluexx
/
..
/
system.1
/
library
/
encryption.php
/
/
<?php /** * @package OpenCart * @author Daniel Kerr, Billy Noah * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/) * @license https://opensource.org/licenses/GPL-3.0 * @link https://www.opencart.com */ /** * Encryption class */ namespace Opencart\System\Library; class Encryption { private string $cipher = 'aes-256-ctr'; private string $digest = 'sha256'; /** * * * @param string $key * @param string $value * * @return string */ public function encrypt(string $key, string $value): string { $key = openssl_digest($key, $this->digest, true); $iv_length = openssl_cipher_iv_length($this->cipher); $iv = openssl_random_pseudo_bytes($iv_length); return base64_encode($iv . openssl_encrypt($value, $this->cipher, $key, OPENSSL_RAW_DATA, $iv)); } /** * * * @param string $key * @param string $value * * @return string */ public function decrypt(string $key, string $value): string { $result = ''; $key = openssl_digest($key, $this->digest, true); $iv_length = openssl_cipher_iv_length($this->cipher); $value = base64_decode($value); $iv = substr($value, 0, $iv_length); $value = substr($value, $iv_length); if (strlen($iv) == $iv_length) { $result = openssl_decrypt($value, $this->cipher, $key, OPENSSL_RAW_DATA, $iv); } return $result; } }
/home/sudancam/.trash/install.2/../tybluexx/../system.1/library/encryption.php