I need to hash user password into a .net core project with an algorithm which is more secure and fast generate method.
I don't want to add any external packages to my project
I need to hash user password into a .net core project with an algorithm which is more secure and fast generate method.
I don't want to add any external packages to my project
you can use this method
public string GetSha256Hash(string input)
{
using (var hashAlgorithm = new SHA256CryptoServiceProvider())
{
var byteValue = Encoding.UTF8.GetBytes(input);
var byteHash = hashAlgorithm.ComputeHash(byteValue);
return Convert.ToBase64String(byteHash);
}
}