You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

15 lines
427 B

using System.Security.Cryptography;
using System.Text;
namespace Identity.Api.Infrastructure.Converts;
public class PassWordConvert
{
public static string HashSHA256(string password)
{
var passwordByte = Encoding.UTF8.GetBytes(password);
var passWordHashByte = SHA256.HashData(passwordByte);
var passWordHash = Convert.ToBase64String(passWordHashByte);
return passWordHash;
}
}