soukoku / PgpSharp

Some pgp stuff in C#
MIT License
14 stars 5 forks source link

Decryption does not allow an output directory #8

Open fieala opened 8 years ago

fieala commented 8 years ago

Is there a way to specify an output directory instead of a file name when decrypting? I do not know the file names in the encrypted file.

soukoku commented 8 years ago

That doesn't sound like it's going to work. If you don't know the file name then the lib won't know it either. Names are not part of the encrypted data.

fieala commented 8 years ago

It would be the equivalent of "gpg --decrypt my-file.gpg" my-file.gpg is the only file specified. The file would be decrypted in the same directory and GPG knows the original file name; the same file name that was supplied with the "gpg --encrypt" command.

rokx commented 7 years ago

In most cases only gpg extension is the difference in the filename. Encrypt: test.txt ->test.txt.gpg Decrypt: test.txt.gpg -> test.txt

Like @soukoku said, there is no filename information in the encrypted data, Just the content is encrypted. You can basically name it to whatever you like.