Search code examples
c#servicegnupg

c# application that runs GPG commands


I am currently trying to create a c# service application that uses service to encrypt files and decrypt files using gpg commands automatically. Since there will be little to no user interaction, how do I implement inputting paths and file names to the service? Currently, I did a simple hard-coded gpg command in the service that runs the encryption.


Solution

  • A fairly simple option would be to configure input and output directories in your app.config and poll the input periodically using the Timer class.

    A slightly more complicated option would be to host a simple WCF service inside a win service that took input and output paths as parameters.