Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

[Забанили в поиске...] Как исправить ошибку

Recommended Posts

Выдается ошибка Fatal error: Call to undefined function hash() in.............../upload/system/library/encryption.php on line 7



final class Encryption {
private $key;
private $iv;
public function __construct($key) {
        $this->key = hash('sha256', $key, true);
$this->iv = mcrypt_create_iv(32, MCRYPT_RAND);
public function encrypt($value) {
return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->key, $value, MCRYPT_MODE_ECB, $this->iv)), '+/=', '-_,');
public function decrypt($value) {
return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, base64_decode(strtr($value, '-_,', '+/=')), MCRYPT_MODE_ECB, $this->iv));
Link to post
Share on other sites

Поиск по слову "call to undefined function hash()" вернул 12 результатов

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.