GnuPG Wrapper with C#
14,088
You can try using my open source and free GnuPG wrapper for C# (and VB.NET). All the code is licensed via MIT, non-GPL restrictions. You can find the release with source code at CodePlex. Look for the Alpha release to find the GPG library.
Example:
GnuPG gpg = new GnuPG();
gpg.Recipient = "[email protected]";
FileStream sourceFile = new FileStream(@"c:\temp\source.txt", FileMode.Open);
FileStream outputFile = new FileStream(@"c:\temp\output.txt", FileMode.Create);
// encrypt the data using IO Streams - any type of input and output IO Stream can be used
gpg.Encrypt(sourceFile, outputFile);
Comments
-
iburlakov almost 2 years
I use GnuPG and C# to encrypt files with imported public keys. But when I try to make encryption, GnuPG encrypt file with public key of main user. I'm sure that I pass right recipient.
-
Umamaheswaran over 11 yearsHi, this solution works for a console application when i'm running this from a Windows service im getting error as gpg2.exe has stopped working
-
Marcel Popescu over 11 yearsThis component appears abandoned... there's a comment from Sep 9, 2012 saying it has moved to the starksoft.com site, but there's nothing about it there (and gets redirected to yet another site)
-
Benton over 11 yearsThe code is all hosted under CodePlex. Just go there and get the Alpha release of the Biko library. It is not abandoned.
-
Jayd over 10 yearsThe Biko Library seems to be just FTP. How is that helpful to the question? It doesn't mention PGP, onenPGP, GnuPG or GPG anywhere on the site? Maybe the purpose of the project has changed?
-
Holger Böhnke almost 3 yearsLooks the project migrated to github: github.com/bentonstark/starksoft-aspen There seems to be a nuget as well: nuget.org/packages/starksoft.aspen/1.0.0