using System.Diagnostics;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
public static void Main()
var iterations = 1000000;
var bytes = new byte[100];
var random = new Random();
var stopwatch = new Stopwatch();
for (var i = 0; i < iterations; i++)
Console.WriteLine(string.Format("Jenkins: {0}", stopwatch.ElapsedMilliseconds/1000.0));
stopwatch = new Stopwatch();
for (var i = 0; i < iterations; i++)
var md5Hash = md5.ComputeHash(bytes);
BitConverter.ToInt32(md5Hash, 0);
Console.WriteLine(string.Format("MD5: {0}", stopwatch.ElapsedMilliseconds / 1000.0));
stopwatch = new Stopwatch();
for (var i = 0; i < iterations; i++)
foreach (var byte_ in bytes)
Console.WriteLine(string.Format("Jenkins: {0}", stopwatch.ElapsedMilliseconds/1000.0));
public static int JenkinsHash(byte[] key)
foreach (var byte_ in key)