note 28200 modified in ref.mcrypt by jsheets
| From: | jsheets@php.net | Date: | Mon, 13 Jan 2003 04:30:25 +0000 |
| Subject: | note 28200 modified in ref.mcrypt by jsheets | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42040@lists.php.net to get a copy of this message | ||
[Editor's Note]
Please remember that the decrypted data may be longer than the original data due to the data padding
that can take place.
Don't forget when using custom crypt functions (as above) for storing passwords:
$a = 'Both should be equal.';
$b= encrypt($a, $key);
$c= decrypt($b, $key);
if ($a!=$c) { echo "Comparision doesn't work."; }
$a = 'Both should be equal.';
$b= encrypt($a, $key);
$c= (string)(decrypt($b, $key));
if ($a==$c) { echo "Works fine."; }
--was--
Don't forget when using custom crypt functions (as above) for storing passwords:
$a = 'Both should be equal.';
$b= encrypt($a, $key);
$c= decrypt($b, $key);
if ($a!=$c) { echo "Comparision doesn't work."; }
$a = 'Both should be equal.';
$b= encrypt($a, $key);
$c= (string)(decrypt($b, $key));
if ($a==$c) { echo "Works fine."; }
http://www.php.net/manual/en/ref.mcrypt.php