私の問題は、コマンドラインを実行しても解読テキストファイルに何も追加されないということです。 decrypt.txtファイルにテキストを追加して、テキストが書き込まれたかどうかを確認しました。私は最近gpg.exe多くのものをやってきたPGPとC#でファイルを解読する
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo("cmd.exe");
psi.CreateNoWindow = true;
psi.UseShellExecute = false;
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.WorkingDirectory = "c:\\";
System.Diagnostics.Process process = System.Diagnostics.Process.Start(psi);
string sCommandLine = "echo femme toxin sorghum| gpg.exe --batch --passphrase-fd 0 --decrypt E:\\entemp.txt > E:\\detemp.txt";
process.StandardInput.WriteLine(sCommandLine);
process.StandardInput.Flush();
process.StandardInput.Close();
process.WaitForExit();
process.Close();
これは表面的にはC#に関連していますが、あなたはpgpに助けを求めていますが、gpgを使用しています...そして実際にはgpgの質問ですので、おそらくスーパーユーザが適切でしょう。 – Josh