Ver Mensaje Individual
  #30 (permalink)  
Antiguo 30/06/2010, 17:14
HugoLuna
 
Fecha de Ingreso: junio-2010
Mensajes: 9
Antigüedad: 13 años, 9 meses
Puntos: 1
Respuesta: Facturas Digitales SAT - Mexico C#

Este es el codigo que tengo para encriptar MD5

public static string Codificar(string input)
{
MD5 md5Hasher = MD5.Create();

byte[] data = md5Hasher.ComputeHash(Encoding.Default.GetBytes(in put));

StringBuilder sBuilder = new StringBuilder();

for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}

return sBuilder.ToString();
}