NYCPHP Meetup

NYPHP.org

[nycphp-talk] Encrypt and decrypt to store in DB

Rob Marscher rmarscher at beaffinitive.com
Thu Aug 3 10:46:49 EDT 2006


The openssl extension has some encryption functions:
<http://us3.php.net/manual/en/function.openssl-public-encrypt.php>
The comments on that page have good examples on how to use it.

I'm pretty positive PEAR has Encryption classes too, but I haven't used 
them.

-Rob

Aaron Fischer wrote:
> Greetings,
> 
> I'm storing sensitive information in a MySQL db and will need to read it 
> at some point so I can't do a one way encrypt like md5().
> 
> Following Chris's recommendation of mcrypt(), I ran 
> mcrypt_list_algorithms() and it appears that mcrypt is not available to 
> me on my server.
> 
> Are there any other functions/classes that folks would recommend that 
> would allow me to encrypt and decrypt a string?
> 
> Thanks,
> 
> -Aaron
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
> 
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
> 



More information about the talk mailing list