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()); } }
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"); }
protected override void ExtraTask() { var pwd = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); GammaRSASimplify.GenerateKeyFiles(Path.Combine(Source_location, prvkf), Path.Combine(pwd, pubkf)); }