problem with mcrypt_generic_deinit function
| From: | php | Date: | Mon, 11 Apr 2005 11:57:46 +0000 |
| Subject: | problem with mcrypt_generic_deinit function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212795@lists.php.net to get a copy of this message | ||
I have a problem with this function.
When I execute via web the script:
<?php
$llave = "esta es una llave secre";
$entrada = "Encontrémonos a las 9 en punto en el lugar secre.";
$td = mcrypt_module_open('tripledes', '', 'ofb', '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $llave, $iv);
$datos_cifrados = mcrypt_generic($td, $entrada);
echo $datos_cifrados;
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
?>
I get the following:
3`ZïeYS lyZøW».c¿º¾óÇY»ÞÐ"
”4½ôUr-Ì¿°˜¯h
Fatal error: Call to undefined function: mcrypt_generic_deinit() in
/path/script.php on line 10
The first line on the www client is the third line on the script:
"Encontrémonos a las 9 en punto en el lugar secre", but encrypted.
If I comment line 10 the script run succesfully.
The server is a debian woody with apache and php-mcrypt module.
The function mcrypt_generic_deinit is necessary or is posible to use mcrypt
without this function?
Could somebody help me with this.
Thanks in advance.