Hi, I have the following script that encode data using 3DES, but I cannot make a script to DECODE that data because all the tries return me thwe wrong string, can anybody tell me the right script to decode the data?

Copied from PHP Manual:

<?php
   $key = "this is a secret key";
   $input = "Let us meet at 9 o'clock at the secret place.";

   $td = mcrypt_module_open('tripledes', '', 'ecb', '');
   $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
   mcrypt_generic_init($td, $key, $iv);
   $encrypted_data = mcrypt_generic($td, $input);
   mcrypt_generic_deinit($td);
   mcrypt_module_close($td);
   echo "KEY = ".$key."<br>";
   echo "INPUT = ".$input."<br>";
   echo "ENCRYPTED = ".$encrypted_data;
?>

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]
TLFNO. 955036800 ext. 111

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to