MD5 or SHA1 hashing - the easy way
If you're looking to use an MD5 or SHA1 hashing algorithm to hash passwords, a lot of people would start looking in the System.Security.Cryptography namespace. But the System.Web.Security namespace offers us the FormsAuthentication.HashPasswordForStoringInConfigFile() static method:
string pwhash = FormsAuthentication.HashPasswordForStoringInConfigFile(password, "md5");
The second parameter can be either "md5" or "sha1".
As far as I'm concerned, simple hashing and enrypt and decryption methods (static) should've been in System.Security.Cryptography in the first place.
What do you think?