Exemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)

        {
            int               ID       = Convert.ToInt32(Session["ID"].ToString());
            string            password = txtPassword.Text.ToString();
            string            Email    = labEmail.Text.ToString();
            SignatureStudents objj     = new SignatureStudents();

            objj.CreateSignature(password, Email, ID);
            string pathPub = System.Web.HttpContext.Current.Server.MapPath("../PageStudents/Sig") + "/" + ID + ".asc";

            string PrivateKey = "Sig/" + ID + "pr" + ".asc";
            GetKey objKey     = new GetKey();

            objKey.AddKeyStudent(pathPub, ID);
            downloadfile(PrivateKey);
        }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int      ID           = Convert.ToInt32(Session["ID"].ToString());
            Studnets loginStudent = new Studnets();
            DataRow  loginS       = loginStudent.drSearchStudentEmail(ID);
            string   password     = null;
            string   Email        = null;

            if (loginS != null)
            {
                password = loginS["Password"].ToString();
                Email    = loginS["Email"].ToString();
            }
            //string password ="******";
            //string Email = "duaa.tan @gmail.com";
            CreateSignature(password, Email, ID);
            string PublicKey  = "C:/Users/Dua'a-Orcas/Desktop/WebApplication1/WebApplication1/WebApplication1/PageStudents/Sig/" + ID + ".asc";
            string PrivateKey = "Sig/" + ID + "pr" + ".asc";
            string PublicKey1 = "Sig/" + ID + ".asc";
            GetKey objKey     = new GetKey();

            objKey.AddKeyStudent(PublicKey, ID);
            downloadfile(PrivateKey);
        }