note 17398 added to ref.mcrypt

From: Date: Thu, 06 Dec 2001 23:46:44 +0000
Subject: note 17398 added to ref.mcrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-21727@lists.php.net to get a copy of this message
<p>Just a few notes on the main obsticles I, and others seem to face on the process of install libmcrypt, and getting the algorithms to work properly. Both of these items are either in the install file for PHP or right here on this page. But for some reason nobody remebers them. Perhaps because the language used does not make it apparent how common these situations are.</p> <p>If you are on linux and have install shared libraries(almost everyone), the location of your libmcrypt library files must be entered into your "/etc/ld.so.conf" file. For example, if you installed libmcrypt in "/usr/local/libmcrypt" than your "lib" directory is "/usr/local/libmcrypt/lib". You must enter this dir exactly like this, in your "/etc/ld.so.conf" file, on a new line, save the file, then run "ldconfig" (that's "L" dconfig, not "idconfig") at the command line. This is so all know where to look for shared library files on the system.</p> <p>Second, when recording ciphertext and using an IV (initialization vector) in your script, The IV MUST be the same for encryption and decryption. This means that you only create a new IV during encryption, then record that with the ciphertext, and when you decrypt, you use that as the value for mcrypt_create_iv(). Another way is to use repeatable comon index as the IV, such as the MD5 hash of the ciphertext filename.</p> <p>Good Luck!</p> Edward -- http://www.php.net/manual/en/ref.mcrypt.php http://master.php.net/manage/user-notes.php?action=edit+17398 http://master.php.net/manage/user-notes.php?action=delete+17398 http://master.php.net/manage/user-notes.php?action=reject+17398

« previous php.notes (#21727) next »