public static Guid GetMD5(string str) { lock (md5Provider) { return new Guid(md5Provider.ComputeHash(Encoding.Unicode.GetBytes(str))); } }