Esempio n. 1
0
 private void EncryptorForm_Load(object sender, EventArgs e)
 {
     if (ThisAddIn.usePassword)
     {
         textBox1.Text = ThisAddIn.getPassword();
     }
 }
Esempio n. 2
0
 public DecryptForm(Outlook.MailItem mailitem)
 {
     this.mailitem = mailitem;
     InitializeComponent();
     if (ThisAddIn.usePassword)
     {
         textBox1.Text = ThisAddIn.getPassword();
     }
     this.ShowDialog();
 }
Esempio n. 3
0
        private void buttonDecrypt_Click(object sender, EventArgs e)
        {
            String pass = textBox1.Text;

            if (pass != ThisAddIn.getPassword())
            {
                ThisAddIn.setPassword(pass);
            }
            String text = OutlookHelperTool.getMailText(mailitem, true);

            tempMessage = Encrypt.DecryptString(text, pass, OutlookHelperTool.getinitVector(OutlookHelperTool.getMailText(mailitem, false)));

            //OutlookHelperTool.setMailText(Encrypt.DecryptString(text, textBox1.Text,OutlookHelperTool.getinitVector(text)));
            buttonApply.Enabled   = true;
            buttonPreview.Enabled = true;
        }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            String pass = textBox1.Text;

            if (pass != ThisAddIn.getPassword())
            {
                ThisAddIn.setPassword(pass);
            }

            Tuple <String, String> cryptedtuple = Encrypt.EncryptString(OutlookHelperTool.getMailText(false), pass);
            String crypted = cryptedtuple.Item1;
            String vector  = cryptedtuple.Item2;


            tempMessage = OutlookHelperTool.getPreparedMessage(crypted, vector);

            cryption = true;
            //OutlookHelperTool.setMailText(exportString);
            buttonApply.Enabled   = true;
            buttonPreview.Enabled = true;
        }