Windows Console App

Results 1 to 3 of 3

Thread: Windows Console App

  1. #1
    Join Date
    Dec 1969

    Default Windows Console App

    I am trying to decrypt a file using my PGP keyring inside a C# windows console application. I have a program that will detect a new file on my server. I&#039;m building another app that will first decrypt the file and then start the file processing. <BR><BR>The code I use to decrypt the file without inserting a passphrase works but instead uses the passphrase read from password.txt,<BR><BR>gpg.exe --output mydoc.txt --passphrase-fd 0 &#060; password.txt --decrypt myencrypteddoc.dat.pgp<BR><BR>This works when I run it at command line. But inside the console it seems to hang when reading the file descriptor because the command window message "Reading file descriptor 0 ..." continually displays and the decryption never occurs.<BR><BR>Process process = new Process();<BR>process.StartInfo.FileName="E:\Progr am Files\pgp\gpg.exe";<BR><BR>process.StartInfo.Argum ents="--output mydoc.txt --passphrase-fd 0 &#060; password.txt --decrypt myencrypteddoc.dat.pgp";<BR><BR>process.Start();<B R>process.WaitForExit();<BR><BR>Any help with this would be appreciated.<BR><BR>Thank You!<BR><BR>mazn<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Windows Console App

    password.txt is not being open for a read!<BR>You are passing paasword.txt to the string not the content

  3. #3
    Join Date
    Dec 1969

    Default does it have to do with the fact

    that you call "gpg.exe" and not "pgp.exe" ? just something i spotted....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts