Im trying to update my function from PHP 5.5 version to PHP 7. But result is return diffrent in both function. PHP 5.5 result is correct and PHP 7 result is wrong. What is tha alternative solutions for this code?. Anyone aware of this function?
PHP 5.5 - Result is correct
public function decrypt($input){
$input = base64_decode($input);
$result = mcrypt_decrypt(MCRYPT_DES, $this->key3,$input, MCRYPT_MODE_CBC, $this->iv);
return $result;
}
PHP 7.1.0 Result not correct.
public function decrypt($input){
$inputs = base64_decode($input);
$result = openssl_decrypt($input,'AES-256-CBC', $this->key3, OPENSSL_RAW_DATA, $this->iv);
return $result;
}