public void gui_key(int x)
        {
            Tao_p_g();
            dh = new diffie_hellman(p, g);
            string s = x + ";" + p + ";" + g + ";" + dh.Publickey;

            senddata(s);
        }
 public void gen_keychung_va_send_key_public(string[] mess)
 {
     p  = Convert.ToInt32(mess[1]);
     g  = Convert.ToInt32(mess[2]);
     dh = new diffie_hellman(p, g);
     dh.Tinh_key_chung(Convert.ToInt32(mess[3]));
     key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(Convert.ToString(dh.Key_Chung)));
     senddata(Convert.ToString(2 + ";" + dh.Publickey));
     this.SetText(Convert.ToString(dh.Key_Chung), "Server");
     textBoxkey.Text = Convert.ToBase64String(key);
 }