Open kumarangp opened 4 years ago
In AuthRepository.cs VerifyPasswordHash() method computed hash and password hash not same when giving correct password. how to solve this problem ?
using (var hmac = new System.Security.Cryptography.HMACSHA512(passwordSalt)) { var computedHash = hmac.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password)); for(int i = 0; i < computedHash.Length; i++) { if(computedHash[i] != passwordHash[i]) return false; } return true; }
In AuthRepository.cs VerifyPasswordHash() method computed hash and password hash not same when giving correct password. how to solve this problem ?
using (var hmac = new System.Security.Cryptography.HMACSHA512(passwordSalt)) { var computedHash = hmac.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password)); for(int i = 0; i < computedHash.Length; i++) { if(computedHash[i] != passwordHash[i]) return false; } return true; }