// 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(); string output = Convert.ToBase64String(md5.ComputeHash(utf8.GetBytes(input))); Console.WriteLine(input + " -> " + output); } }