Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- bool bool_0 = true;
- bool bool_1 = true;
- string str = RandomString(6);
- string str2 = "Typical";
- string str3 = bool_0 ? string.Format("{0}_{1}", "Fotosizer Professional v2", "5D4F30AD-0ADD-4703-B0A0-BA72F0FCB164") : "Fotosizer Professional v2";
- string str4 = smethod_16(string.Format("{0}{1}{2}", str, str2, str3), bool_1).Substring(0, 14).ToUpper();
- textBox1.Text = string.Format("{0}{1}-{2}-{3}", new object[] { str, str4.Substring(0, 2), str4.Substring(2, 4), smethod_0(str4, 8) });
- }
- private static string smethod_16(string string_7, bool bool_0)
- {
- string str = string.Empty;
- byte[] bytes = Encoding.ASCII.GetBytes(string_7);
- try
- {
- byte[] buffer2;
- if (bool_0)
- {
- buffer2 = new SHA1CryptoServiceProvider().ComputeHash(bytes);
- }
- else
- {
- buffer2 = MD5.Create().ComputeHash(bytes);
- }
- StringBuilder builder = new StringBuilder();
- for (int i = 0; i < buffer2.Length; i++)
- {
- builder.Append(buffer2[i].ToString("X2"));
- }
- str = builder.ToString();
- }
- catch (Exception exception1)
- {
- }
- return str;
- }
- public static string smethod_0(string string_0, int int_0)
- {
- return string_0.Substring(string_0.Length - int_0, int_0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement