NYCPHP Meetup

NYPHP.org

[nycphp-talk] Encrypt/Decrypt without MCrypt

Jeff Siegel jsiegel1 at optonline.net
Mon Dec 1 09:38:47 EST 2003


Did I forget to mention that it wasn't the *hottest* code
in the world? ;)

Jeff

Daniel Kushner wrote:
> Hi Jeff,
> 
> That wouldn't really work. decoding the $sEncoded variable would result in
> a serialized array, thus exposing your PIN.
> 
> Best,
> Daniel
> 
> 
> 
>>-----Original Message-----
>>From: talk-bounces at lists.nyphp.org
>>[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jeff Siegel
>>Sent: Monday, December 01, 2003 9:18 AM
>>To: NYPHP Talk
>>Subject: [nycphp-talk] Encrypt/Decrypt without MCrypt
>>
>>
>>I may be faced with a situation where I don't have MCrypt for
>>encrypting/decrypting data. I need to store the PIN numbers in a
>>database and be able to retrieve them. Is there some other method I can
>>use instead? I was thinking, perhaps, something like the following:
>>
>>$myPinNumber = "123DGH";
>>$sSecret    = '7R5D1N3V5C4Y6Z2X';
>>$ary    = array('PIN'    =>    $myPinNumber, 'Secret'    =>
>>$sSecret);
>>$sEncoded    = base64_encode(serialize($ary));
>>
>>Jeff Siegel
>>
>>_______________________________________________
>>talk mailing list
>>talk at lists.nyphp.org
>>http://lists.nyphp.org/mailman/listinfo/talk
>>
> 
> 
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 




More information about the talk mailing list