Hi,
I'm pretty new to all this but thought i'd start off doing this properly and work it out as I go, however a little advice is always apprecaited.
I'm going to incorporate password salt and hashing, and have found this code amongst the articles I have read which seems to do the job perfectly.
public static string CreateSalt(int size)
{
//Generate a cryptographic random number.
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
byte[] buff = new byte[size];
rng.GetBytes(buff);
// Return a Base64 string representation of the random number.
return Convert.ToBase64String(buff);
}
public static string CreatePasswordHash(string pwd, string salt)
{
string saltAndPwd = String.Concat(pwd, salt);
string hashedPwd = FormsAuthenti ...
Go to the complete details ...