After upgrading to .Net 4.5, I am now getting the warning that “System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile is obsolete” and the suggestion is to use the membership APIs instead.
This is all very well and good for new projects, but at this stage (with user data and hashed passwords existing), I can’t very well change to a custom membership provider with potentially different ways of hashing.
Whats the recommended way forward for issues like this? Continuing to use “obsolete” calls is obviously not the suggested path, so has it been replaced by something else other than “just use the membership APIs”?
This is a solution for SHA1 variant.
For MD5 you only need to change the algorithm to:
Hope you don’t mind, just going to add a VB.NET variant of your code above: