byte[] by = Encoding.Default.GetBytes("000000"); by = new MD5CryptoServiceProvider().ComputeHash(by); string text1 = ""; for (int num1 = 0; num1 < by.Length; num1++) { text1 = text1 + by[num1].ToString("x").PadLeft(2, '0'); }