Hola! a ver que les parecen las dos ideas .......
public static byte[] GetHash(string cadena, string Salt, byte[] clave)
{
System.Security.Cryptography.HMACSHA1 sha1;
if (clave != null)
{
sha1 = new System.Security.Cryptography.HMACSHA1(clave);
}
else
{
sha1 = new System.Security.Cryptography.HMACSHA1();
}
System.Text.ASCIIEncoding encoder = new System.Text.ASCIIEncoding();
byte[] inBloque = encoder.GetBytes(cadena + Salt);
return sha1.ComputeHash(inBloque, 0, inBloque.Length);
}
No hay comentarios:
Publicar un comentario