private void btnVDigital_Click(object sender, EventArgs e) { RSA_ND RSA = new RSA_ND(); RSA.TeDhenatPublikeXML(file); byte[] HashiNgaNenshkrimi = RSA.VerifikimiNenshkrimit(nenshkrimi, plain); rtbHngaNenshkrimi.Text = BitConverter.ToString(HashiNgaNenshkrimi); }
private void btnDekriptimi_Click(object sender, EventArgs e) { RSA_ND RSA = new RSA_ND(); RSA.TeDhenatPrivateXML(file); byte[] tekstiDekriptuar = RSA.Dekriptimi(cipher); rtbTextDekriptuar.Text = Encoding.UTF8.GetString(tekstiDekriptuar); }
private void btnEnkriptimi_Click(object sender, EventArgs e) { RSA_ND objrsa = new RSA_ND(); plain = Encoding.UTF8.GetBytes(rtbPlain.Text); objrsa.TeDhenatPublikeXML(file); cipher = objrsa.Enkriptimi(plain); rtbCipher.Text = Convert.ToBase64String(cipher); }
private void btnNDigital_Click(object sender, EventArgs e) { RSA_ND RSA = new RSA_ND(); RSA.TeDhenatPrivateXML(file); SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider(); hashi = sha1.ComputeHash(plain); rtbHGjeneruar.Text = BitConverter.ToString(hashi); nenshkrimi = RSA.NenshkrimiDigjital(plain); }