Hi,
I'm fairly new to mcrypt. but I have read the manual and it states that mcrypt is supported as of (PHP 4 >= 4.0.2). My current hosting company has PHP 4.1.2 installed but yet when I try accessing mcrypt I get the following error:
undefined function: mcrypt_get_iv_size()
I understand that the error is stating that it can't find the required function, but why not? It is supposed to be included in PHP 4 >= 4.0.2 and I'm using PHP4.1.2.
How can I get around this?
By the way, the code that I am using is right from the php.net site. It was in the user notes for the mcrypt function. If that helps, here it is:
function encrypt_normal($key, $plain_text) {
/ generate an initialization vector /
$iv = substr(md5($key), 0, mcrypt_get_iv_size(MCRYPT_CAST_256,MCRYPT_MODE_CF😎);
/ now we do our normal encrypting /
$c_t = mcrypt_encrypt (MCRYPT_CAST_256, $key, $plain_text, "cfb", $iv);
return trim(chop(base64_encode($c_t)));
}
I have run this successfully on a box running PHP4.2.2
Thanks for any help!
JeNNiDeS