using System.Security.Cryptography;
using System.Text.RegularExpressions;
public string CreatePasswordSHA1(string password)
{
SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider();
byte[] bs = System.Text.Encoding.UTF8.GetBytes(password);
bs = sha1.ComputeHash(bs);
System.Text.StringBuilder s = new System.Text.StringBuilder();
foreach (byte b in bs){
s.Append(b.ToString("x2").ToLower());
}
return s.ToString();
}
Sistema para la administracion de hospitales, almacenes, facturacion, laboratorio, farmacia, registro en linea de cargos realizdos a paciente, separacion de paquetes, caja, tesoreria, etc.
jueves, 3 de diciembre de 2015
Create Password SHA256 C#
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();
}
{
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();
}
Suscribirse a:
Entradas (Atom)