Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

decrypt text instead of a file?

Created: 28 Sep 2012 • Updated: 02 Oct 2012 | 7 comments
This issue has been solved. See solution.

Documentation for Encrypt command says   "Input is either the standard input or a list of files" .  Does this also apply to Decrypt ?

Background :

I am using PGP Command Line 10.

The following works ok :

pgp  --decrypt "C:\input.pgp" --passphrase "xx" --output "C:\Users\xxx\AppData\Local\Temp\17951a62-a0b9-4912-95a3-3132f8c72f77.out" --overwrite remove --home-dir "C:\PGP\pgphomedir

I would like to use Standard Input instead of a input file.

  Thanks, Peter

Comments 7 CommentsJump to latest comment

dfinkelstein's picture

Yes, in general things like this work:

cat input | pgp -er recpient --input - --output - | <do something with the output>

Regards,

--------

David Finkelstein

Symantec R&D

petercli's picture

Doesn't work for me.

Instead of using a input file name, I tried to write the text to standard input , but I get this error :

 3000:no input file specified)\r\n"

I suspect the --decrypt behaves differently than --encrypt.

Peter

dfinkelstein's picture

Can you provide some more details?  E.g. the following works for me:

pgp -er recipient file.txt

cat file.txt.pgp | pgp --decrypt --input - --passphrase pass -o copy.txt

What exact version are you running, and on what platform?

Thanks.

--------

David Finkelstein

Symantec R&D

petercli's picture

My original questions listed a working decrypt command.

If I  replace the input file with standard input, I get the error 3000:no input file specified)\r\n" Example :

pgp  --decrypt  --passphrase "xx" --output "C:\Users\xxx\AppData\Local\Temp\17951a62-a0b9-4912-95a3-3132f8c72f77.out" --overwrite remove --home-dir "C:\PGP\pgphomedir

dfinkelstein's picture

You are not providing any input to decrypt.  For stdin, you need to use "--input -" as in the example I gave.

Regards,

--------

David Finkelstein

Symantec R&D

dfinkelstein's picture

Great, glad you got that working.

--------

David Finkelstein

Symantec R&D