diff --git a/web/faq/gpgme-faq.org b/web/faq/gpgme-faq.org index 814d12c..36936cc 100644 --- a/web/faq/gpgme-faq.org +++ b/web/faq/gpgme-faq.org @@ -1,34 +1,64 @@ #+TITLE: GPGME FAQ --- GnuPG.org * GPGME FAQ GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management. * Frequently Asked Questions ** Why does the function =gpgme_data_seek= not work? You probably did not compile the program with largefile support. GPGME is compiled with largefile support by default, so off_t is a 64-bit data type. Because =gpgme_data_seek= uses =off_t= as a parameter type, you have to compile your program with largefile support as well, so that the data types used by GPGME and by your program match. Note that you have to compile your program with largefile support even if you do not use =gpgme_data_seek=, because file descriptors are exchanged between the program and GPGME. The GPGME documentation contains much more information on the subject. See section 2.3 Largefile support of the GPGME Reference Manual. +** Why don't the Python bindings announced in 2016 work? + + The Python bindings have been undergoing continual improvement and + fine tuning since the initial announcement. To obtain the most + accurate bindings it is recommended to install the bindings shipped + with GPGME itself rather than older versions available on PyPI. + + The Python module has been renamed from =pyme= or =pyme3= and is + now simply called =gpg=. Otherwise the function remains similar + and example code is included with the source. + + A basic decryption operation to take an encrypted file and decrypt + it with a key in your secret keys would look something like this: + + #+begin_example + import gpg + + ciphertext = open("filename.txt.asc", "rb") + plaintext = gpg.Context().decrypt(ciphertext) + ciphertext.close() + f = open("filename.txt", "wb") + f.write(plaintext[0]) + f.close() + del plaintext + #+end_example + + + # Copyright (C) 2002-2004 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 The GnuPG Project. # # Written by Werner Koch (2006-04-27 12:50:00). +# Ammended by Ben McGinnes (2018-02-14 08:21:32 UTC).