File name of the Output decrypted file (absolute or relative path). Optional parameter. If empty the name stored in the PGP decrypted file is used.
using (Stream fOut = File.Create(outputFileName))Hi Matt,
Thank you for this
notice.
In earlier versions this was supported but due to the library being used mostly in ASP.NET applications, decryption of a file this way ended being in a folder not expected by the developers.
This has been removed
from the documentation. You can download the updated setup, if
you use Helpviewer format.
--
You received this message because you are subscribed to the Google Groups "DidiSoft Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to didisoft_foru...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to didisoft_forum+unsubscribe@googlegroups.com.
Hi Matt,
Yes, of course.
In the cases when you don't know in advance the contents of an incoming encrypted file or you would like to implement complex logic depending on the encrypted content (for example for images one output location, for documents another, etc.) you have to use the methods of another helper class DidiSoft.Pgp.Inpsect.PGPInspectLib.
Here is a simple
example from:
https://www.didisoft.com/net-openpgp/examples/analyzing-unknown-openpgp-archives/
that illustrates how to list what's inside a .pgp file:
using DidiSoft.Pgp.Inspect; public class InspectEncryptedFile { public void Demo() { // // Inspect the content of an encrypted file without decrypting it // String privateKey = @"c:\private_key.asc"; String privateKeyPassword = "key password"; String encryptedFile = @"c:\encrypted.pgp"; PGPInspectLib inspectLib = new PGPInspectLib(); ContentItem[] files = inspectLib.ListOpenPgpFile(encryptedFile, _ privateKey, _ privateKeyPassword); Console.WriteLine(encryptedFile + " contains:"); foreach (ContentItem file in files) { Console.Write(file.FileName); Console.Write(file.IsDirectory ? "[dir]" : "[file]"); Console.WriteLine(file.ModificationTime); } } } The value of file.FileName printed with the code above is what you need.