CSharp examples for Security:MD5
MD5 Encrypt
using System.Text; using System.Security.Cryptography; using System;/* w w w .ja va 2 s . co m*/ public class Main{ public static String Encrypt(String source) { MD5 md5 = new MD5CryptoServiceProvider(); Byte[] sourceBytes = Encoding.UTF8.GetBytes(source); Byte[] outputBytes = md5.ComputeHash(sourceBytes); String result = BitConverter.ToString(outputBytes).Replace("-", ""); return result; } }