note 36410 rejected from function.mcrypt-encrypt by vincent

From: Date: Thu, 09 Oct 2003 10:48:01 +0000
Subject: note 36410 rejected from function.mcrypt-encrypt by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58102@lists.php.net to get a copy of this message
Note Submitter: jlgerfen@hotmail.com ---- I am looking to find a way to recursively encrypt the content of an array... example: $form_data = array($var1, $var2, $var3); $key = "key_for_encrypted/decrypting_message"; $td = mcrypt_module_open ('tripledes', '', 'ecb', ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND); mcrypt_generic_init ($td, $key, $iv); if ($i = 0; $i < $form_data; $i++) { $encrypted_data = mcrypt_generic ($td, array($form_data); } // Does encrypt the array As of yet I have tried numerous variations and had no result in the decrypting of the array once it has been encrypted. Example of decrypting... $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_deinit ($td, $key, $iv); $decrypted_data = mcrypt_generic ($td, strlen(array($input))); mcrypt_generic_deinit ($td); mcrypt_module_close ($td); Any ideas? Jas

« previous php.notes (#58102) next »