
{filelink=17843}
using System;
namespace MesExemples.com
{
public class EncodageMD5
{
public string Encoder(string MotDePasse)
{
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] bs = System.Text.Encoding.UTF8.GetBytes(MotDePasse);
bs = x.ComputeHash(bs);
System.Text.StringBuilder s = new System.Text.StringBuilder();
foreach (byte b in bs )
{
s.Append(b.ToString("x2").ToLower());
}
MotDePasse = s.ToString();
return MotDePasse ;
}
}
}