Posted on: 3/18/2014 6:19:24 PM | Views : 607

Dear all, 
I am trying verify the createdpasswordHash with u.username.  Do i need to create a new method for this or can I just amend the exsiting 'validate' method.  
private static string CreateSalt() { RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); byte[] buff = new byte[32]; rng.GetBytes(buff); return Convert.ToBase64String(buff); } private static string CreatePasswordHash(string pwd, string salt) { string saltAndPwd = String.Concat(pwd, salt); string hashedPwd = FormsAuthentication.HashPasswordForStoringInConfigFile( saltAndPwd, "sha1"); return hashedPwd; } public api_login Validate2(string userName, string Password) { // Find a user that matches that username and password (this will ...

Go to the complete details ...