Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DotGeek:
Mcrypting Your Data Simply
Feb 19, 2004 @ 13:03:42

Some programmers out there look to PHP to provide them with all of the web application features that they might need, including a way to encrypt sensitive data like passwords or bank account numbers. One way has always been to md5 it and just use that data generated, but there's another two-way encrpytion that DotGeek.org is covering today.

In Getting Started With Mcrypt, they introduce you to the world of the mcrypt functionality - including how to get the extension to work with PHP, and a small chunk of sample code to help you get started.

Obviously, there is lots more to be learned at: http://www.php.net/manual/en/ref.mcrypt.php but hopefully this will give you the incentive you've been looking for to start playing with 2-way cryptography. One excellent use I have discovered is encrypting and then decrypting cookies, which almost totally guarantees the cookie has not been tampered with.

tagged:

Link:


Trending Topics: