Re: TripleDES encryption

From: Date: Tue, 08 Apr 2003 14:51:12 +0000
Subject: Re: TripleDES encryption
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142872@lists.php.net to get a copy of this message
Change the format of the string to base 16. You would have to reformat it to binary when you retrieve it. Use bin2hex() and the following: //from php.net function hex2asc($myin) { for ($i=0; $i<strlen($myin)/2; $i++) { $myout.=chr(base_convert(substr($myin,$i*2,2),16,10)); } return $myout; } BTW, why TripleDES ? It's considered somewhat weak now. Are you using libmcrypt? If you do, use rijndael-256 instead. On Tue, 2003-04-08 at 09:25, Dan Joseph wrote: > Hi Everyone, > > I am having an issue storing TripleDES encrypted account numbers into a > MySQL table, and then being able to retrieve them. It appears that the > information is being garbled when it goes in. > > Has anyone had experience with this? Could you tell me what type column > you had in your table, and maybe give me some insight on how to handle the > funny characters? > > -Dan Joseph > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#142872) next »