Exemplo n.º 1
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;
        }
Exemplo n.º 2
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;
        }