= GPGME - an API to GnuPG The recommended way to use the ~GnuPG crypto stack from your application is ~G~PGME, which is written in C. Here is the [[https://www.gnupg.org/documentation/manuals/gpgme/|online version of the manual]]. A number of ~G~PGME bindings for other programming languages/environments exist (Please point us to missing entries or corrections or add them directly in the wiki.): == All / C == * [[https://www.gnupg.org/gpgme.html|gpgme]] (~GPG Made Easy) is the official GnuPG API. It is implemented in C itself, but this is what you should use from your language as well. === GPGME bindings A number of language bindings are maintained within the ~G~PGME repository. If possible, try to use these bindings. * C++: Based upon the code previously maintained by KDE. * Qt: Based upon the code previously maintained by KDE. * Python: Based upon the 'pyme' bindings, should be backwards compatible. * Common Lisp === Third-party GPGME bindings ==== C++ wrappers == * http://quickgit.kde.org/?p=kdepimlibs.git gpgme++ is a wrapper for gpgme in kdepimlibs ==== C# (c-sharp) wrappers * [[https://github.com/wget/gpgme-sharp|gpgme-sharp]] originally developed by Daniel Mueller in 2009 under LGPL, now under MIT and maintainership taken over by William Gathoye with the intention of being integrated to [[https://github.com/chocolatey/choco|Chocolatey]], the package manager for Windows. The code quality was considered "experimental" and made for 32bits for Windows, but [[https://stackoverflow.com/questions/4156819/using-the-gpgme-library-from-net|some reported success]]. ==== Java wrappers == * [[https://github.com/guardianproject/gnupg-for-java|GnuPG-for-Java]] is a Java wrapper for gpgme >=1.5 and GnuPG >=2.x * [[https://github.com/smartrevolution/gnupg-for-java|GnuPG-for-Java]] is a Java wrapper for gpgme and GnuPG 1.x * [[https://github.com/guardianproject/gnupg-for-android|Gnu Privacy Guard]] is an Android app based [[https://github.com/guardianproject/gnupg-for-java|GnuPG-for-Java]] and uses gpgme to provide a GnuPG engine in Android ==== Python wrappers == * [[https://bitbucket.org/malb/pyme|pyme]] ~SWIG generated wrapper for python2 (continuation of the [[http://pyme.sourceforge.net/|old version]]) * [[https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=tree;f=lang/python;hb=refs/heads/master|pyme for python3]] ~SWIG generated wrapper for python3, port of pyme 0.9, included in G~P~GME v>=1.7. * https://launchpad.net/pygpgme manually written wrapper in C for python2 and python3. GNU ~LGPL v?=2. Packaged for Debian and Ubuntu. ==== Ruby wrappers == * [[https://github.com/ueno/ruby-gpgme|ruby-gpgme]] is a ruby wrapper, which can be installed with: gem install gpgme. = (not recommended) calling executables directly = A number of elder applications call ~GnuPG executables in a subprocess and interact with them via command line arguments and file-descriptors. This is less perferable to ~G~PGME, because the **command line arguments and text outputs are not an (official) API** to ~G~nuPG. While there is an effort made to keep them stable, using the official ~G~PGME API can manage this more precisely and thus you end up with a more robust solution. == C# (c-sharp) * [[https://github.com/WilliamDunne/SharpGPG|SharpGPG]] a GPG wrapper for C# using GPGAPI. == Objective-C * [[https://github.com/GPGTools/Libmacgpg|Libmacgpg]] is a Mac OS X Framework built on top of GnuPG (but not gpgme), used as part of the [[https://gpgtools.org/|GPGTools suite]]. == Python * [[https://pypi.python.org/pypi/python-gnupg|python-gnupg]] using the subprocess module to call the gpg executables (not using the recommended gpgme for python alternatives, see above). Xorg Style license.