Skip to content
Advertisement

PHP how encode/decode text with key?

Code:

JavaScript

It code encode $string. But how decode $result?

Tell me please how decode $result ?

Advertisement

Answer

Decrypt:

JavaScript

You need to change mode in arguments and pass encrypted values.

NOTE: mcrypt_generic() has also been DEPRECATED as of PHP 7.1.0.

Read manual: http://www.php.net/manual/en/function.mcrypt-ecb.php.

Better to use mcrypt_generic().

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement