Esempio n. 1
0
        private void LogInBtn_Click(object sender, RoutedEventArgs e)
        {
            bool do_upload = (MessageBox.Show("Upload Now?", "Upload Log", MessageBoxButton.YesNo) == MessageBoxResult.Yes) ? true : false;

            if (do_upload)
            {
                var pwd = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                QAToolsFacade.UploadLogToSftp(SftpUserTB.Text.Trim(), GammaRSASimplify.RSAEncryptString(SftpPWDTB.Password, System.IO.Path.Combine(pwd, "pubkf.xml")), SftpLocTB.Text.Trim(), UploadPath.Text.Trim());
            }
        }
Esempio n. 2
0
 public static void Test(string test)
 {
     GammaRSASimplify.GenerateKeyFiles(@"C:\temp\prv", @"C:\temp\pub");
     var enresult = GammaRSASimplify.RSAEncryptString(test, @"C:\temp\pub");
     var deresult = GammaRSASimplify.RSADecryptString(enresult, @"C:\temp\prv");
 }