What causes this error? Fatal error: Call to undefined function mcrypt_encrypt()

Posted by Jin Yong on Stack Overflow See other posts from Stack Overflow or by Jin Yong
Published on 2010-04-09T00:49:39Z Indexed on 2010/04/09 1:13 UTC
Read the original article Hit count: 485

Filed under:

Does anyone know why this error message: (Call to undefined function mcrypt_encrypt() ) displays when I run the following code below?

Am I missing some steps perhaps any setting in PHP I have to do before this code can work?

$key = 'password to (en/de)crypt';
$string = 'string to be encrypted';

$test = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)));

© Stack Overflow or respective owner

Related posts about php