public string CreatePasswordSHA256(string password)
{
SHA256Managed sha256 = new SHA256Managed();
byte[] bs = System.Text.Encoding.UTF8.GetBytes(password);
bs = sha256.ComputeHash(bs);
System.Text.StringBuilder s = new System.Text.StringBuilder();
foreach (byte b in bs){
s.Append(b.ToString("x2").ToLower());
}
return s.ToString();
}
No hay comentarios:
Publicar un comentario