note 32453 deleted from function.md5 by mazzanet

From: Date: Sun, 12 Jun 2005 22:48:37 +0000
Subject: note 32453 deleted from function.md5 by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-90334@lists.php.net to get a copy of this message
Note Submitter: Dream Master ---- I solved the problem.... Here is a link to my post on phpbb.com about a problem I was having with my perl script md5 encoding my data from within perl.... http://www.phpbb.com/phpBB/viewtopic.php?t=105334 Hope this helps someone... ---- Here's a copy just incase its removed from the phpbb.com site by the time you read this.... ---CUT---- Posted: Wed May 28, 2003 3:09 am Post subject: How to interface Perl with PHP's MD5 Password Encryption Problem: Perl crypt and Php's use of MD5 are not compatible. Encryption is more secure in MD5 as it is a ramdom set of 0-9 and a-f hashs in 64bits no matter what the length or text of the password. Perl's standard crypt cannot do this. Solution: Within your perl script, just before the lines you are setting to write the password, you need to enter the following code. Note: I tried this one Perl 5.006001 so it may not work on older versions. --CLIP-- #load the MD5 Digest. use Digest::MD5 qw(md5_hex); #set your text databse variables to a single string for md5 conversion #remember to change $database_array[1]; to your own variable. $password = $database_array[1]; #generate yet another new string, this one is the converted database_array #note the use of md5_hex $newpassword = md5_hex($password); #Send the $newpassword to your PHP SQL table and your set! --CLIP-- I hope this helps out alot of people... from what I've read about this, no one else on the net could break this code... All it took was a little research, and brain work... I am interested in your thoughts and comments on this... so please reply!!! P.S., Here are the url's to the reference material I used... http://www.php.net/manual/en/function.md5.php http://search.cpan.org/author/GAAS/Digest-MD5-2.24/MD5.pm Good luck modding!!! _________________ Dream Master

« previous php.notes (#90334) next »