Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }