// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Text; using System.Security.Cryptography; class MainClass { public static void Main(string[] args) { string input = "Dette er en lille test streng"; Encoding utf8 = new UTF8Encoding(); MD5 md5 = new MD5CryptoServiceProvider(); byte[] output = md5.ComputeHash(utf8.GetBytes(input)); for(int i = 0; i < output.Length; i++) { Console.Write(String.Format("{0:x2}",output[i])); } Console.WriteLine(); } }