using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class GestaoUtilizador
{
public static string GetHash(string userpassword, string salt)
{
MD5 md5Hsh = MD5.Create();
byte[] data = md5Hsh.ComputeHash(Encoding.Default.GetBytes(userpassword + salt));
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
return sBuilder.ToString();
}
}