I use the default asp.net MVC 4 membership system, and the client needs to send a signature, including its hashed password, for authentication.
I need to hash the password just like a hashed password by the server.
private static bool IsAuthenticated(string hashedPassword, string message, string signature) { if (string.IsNullOrEmpty(hashedPassword)) return false; var verifiedHash = ComputeHash(hashedPassword, message); if (signature != null && signature.Equals(verifiedHash)) return true; return false; }
So, how can I reproduce a hashed password, for example, a saved password in a database?
source share