示例#1
0
        protected void OnFilechooserbutton2SelectionChanged(object sender, EventArgs e)
        {
            string s = Util.readFromFile(filechooserbutton2.Filename);

            textview2.Buffer.Text = s;
            statusbar1.Push(3, "File has been read");
            string hashString = Rsa.getMD5Hash(s);

            entry1.Text = hashString;
        }
示例#2
0
        protected void OnButton4Released(object sender, EventArgs e)
        {
            Thread.Sleep(1500);
            Rsa      r     = new Rsa();
            DateTime start = DateTime.Now;

            byte [] plainText = r.getMyPlainText(cipherText, d, n);
            string  textBack  = r.simpleByteToString(plainText);

            textview4.Buffer.Text = textBack;
            TimeSpan elapsed = DateTime.Now - start;
            string   eTime   = "Decrypted\t\t\t\t\t";

            eTime += "Total time elapsed: " + elapsed.TotalMilliseconds + " milliseconds";
            statusbar1.Push(6, eTime);
            string hashString = Rsa.getMD5Hash(textBack);

            entry2.Text = hashString;
            entry4.Text = "(" + n + ", " + d + ")";
        }