jeudi 16 novembre 2017

Function mcrypt_get_iv_size() is deprecated on Laravel 5.5 and php 7.1.11

I have upgraded laravel 5.3 to laravel 5.5 and I am using php 7.1.11

On upgrading I am getting error

ErrorException (E_ERROR) Function mcrypt_get_iv_size() is deprecated

In config\app I have

'cipher' => 'AES-256-CBC'

Also try adding

error_reporting(E_ALL ^ E_DEPRECATED);

to it but still getting error.

$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, self::$skey, $text, MCRYPT_MODE_ECB, $iv);

This is code where I am using it.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2zHepew
via IFTTT

Aucun commentaire:

Enregistrer un commentaire