Next: , Up: Unattended Usage of GPG   [Contents][Index]


4.5.1 Programmatic use of GnuPG

Please consider using GPGME instead of calling gpg directly. GPGME offers a stable, backend-independent interface for many cryptographic operations. It supports OpenPGP and S/MIME, and also allows interaction with various GnuPG components.

GPGME provides a C-API, and comes with bindings for C++, Qt, and Python. Bindings for other languages are available.

If for some reasons you cannot use GPGME, please make sure to use the --status-fd and --with-colons options to clearly obtain information from GnuPG rather than parsing stdout which is subject to change, localization, and is otherwise intermingled with status output.