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

DevShed:
Using the PHP Crypt Function
Jan 18, 2005 @ 12:55:05

With more and more of the world becoming concerned about security on web applications, Devshed has a timely new posting just to help ease some of those worries - Using the PHP Crypt Function.

The PHP crypt function is a one-way encryption function that lets you confirm that an entered password matches a stored encrypted one -- without having to decrypt anything. Chris Root explains how it works

Protecting user names and passwords, not to mention financial or other personal information, can be a difficult job for any webmaster. Unfortunately there are an awful lot of people out there with nothing better to do than break into your system and steal information, or just wreak havok. One of the tools of the trade for information protection is encryption. There is a built-in function of the PHP language called crypt() which is easy to use and can help you secure information you want to protect.

While a lot of people need two-way encryption for their applications, one-way is much more secure and, as they show in their examples, just as easy to work with. They even suggest a few other useful functions (such as md5 or the mcrypt extension) that can help you secure things even further.

tagged:

Link:


Trending Topics: