note 77786 rejected from function.mcrypt-create-iv by nlopess
| From: | nlopess@php.net | Date: | Thu, 13 Sep 2007 10:24:38 +0000 |
| Subject: | note 77786 rejected from function.mcrypt-create-iv by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-130457@lists.php.net to get a copy of this message | ||
Note Submitter: zjdotnet at gmail dot com
----
I am currently working on encryption project. And I have noticed some interesting facts about using
these 2 functions.
$encrypted_value = mcrypt_encrypt(parameters,..,$original_value,..,$iv_1);
$decrypted_value = mcrypt_decrypt($parameters..,$iv_2);
if $iv_1 and $iv_2 are different, you tend to get 2 different value. Moreover if $iv_1 = $iv_2 but
$iv_1 could not be read or copied to the text editor like NotePad or Words, even $iv_1=$iv_2 ,
$decrypted_value will be different than $original_value. What I mean by $iv_1 = $iv_2 is when I
display them on the browser, they look identical, but when I try to copy one of them to notepad,
some part of the data won't display.
Any idea how I can solve this problem?