Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Unique identifiers: MD5
public static string RandomMD5()
byte[] buffer = GetRandom(16);
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] output = md5.ComputeHash(buffer);
StringBuilder builder = new StringBuilder();
for (int i = 0; i < output.Length; i++)
builder.AppendFormat("{0:x2}", output[i]);
return builder.ToString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment