Main Page

How to Encrypt Passwords in the Database

One school of thought states that the best way to store users' password information is not to store the passwords themselves, but rather hashes of the passwords. When the user first signs up for an account, your application creates a hash of the password and stores that in the database. When the user logs in, your applocation creates a hash of the password entered by the user when logging in and compares it to the hahs of the password stored in the database.

This approach has the advantage of maintaning user privacy; you wouldn't be able to find out what your users' passwords are without a great deal of work. The downside is that you can't email a password reminder should the user forget his or her password (instead, you email them a link leading to a page that lets them define a new password.)

The article How to Encrypt Passwords in the Database covers handling password hashes with source code in PHP and VB.NET/ASP 2.0.

C#'s "Coalesce" Operator

Here's something I didn't know. C# for .NET 2.0 has the ?? operator, called the "Coalesce" operator. I'll explain what it does after the jump.

more »

100K+ .mobi Domains Registered in 4 Days

The .mobi Registry reports in a press release that people from more than 100 countries have registered over 100,000 .mobi domains in the first four days of the domain's general availability. They state that this demonstrates the great demand for these domains and offered this comparison:

In contrast, it took ten years for the general public to register 100,000 PC-based domain names in the early days of the Internet.

I think that's an apples-and-oranges comparison, but it's an interesting one nonetheless.