[git] GPGME - branch, ben/docs/2018-03, updated. gpgme-1.10.0-78-gc27a7a3
by Ben McGinnes
cvs at cvs.gnupg.org
Tue Mar 13 01:51:52 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, ben/docs/2018-03 has been updated
via c27a7a3f994dad0eccee890185582f4350fbf233 (commit)
from f81adeba992a9fd3b5a199e9a2e242a0f53cf639 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c27a7a3f994dad0eccee890185582f4350fbf233
Author: Ben McGinnes <ben at adversary.org>
Date: Tue Mar 13 11:50:38 2018 +1100
doc: python bindings howto
* Added text description for the decryption example.
diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org
index 4d02f97..40d2814 100644
--- a/lang/python/docs/GPGMEpythonHOWTOen.org
+++ b/lang/python/docs/GPGMEpythonHOWTOen.org
@@ -451,9 +451,14 @@
:CUSTOM_ID: howto-basic-encryption
:END:
- Decrypting something encrypted to a key in one's secret keyring
- (will display some extra data you normally wouldn't show, but which
- may be of use):
+ Decrypting something encrypted to a key in one's secret keyring is
+ fairly straight forward.
+
+ In this example code, however, preconfiguring either
+ =gpg.Context()= or =gpg.core.Context()= as =c= is unnecessary
+ because there is no need to modify the Context prior to conducting
+ the decryption and since the Context is only used once, setting it
+ to =c= simply adds lines for no gain.
#+begin_src python
import os.path
@@ -481,6 +486,11 @@
pass
#+end_src
+ The data available in plaintext in this example is the decrypted
+ content as a byte object in =plaintext[0]=, the recipient key IDs
+ and algorithms in =plaintext[1]= and the results of verifying any
+ signatures of the data in =plaintext[0]=.
+
** Signing text
:PROPERTIES:
@@ -550,7 +560,7 @@
#+begin_src python
import gpg
- tfile = open("/path/to/statement.txt", "r")
+ tfile = open("/path/to/statement.txt", "rb")
text = tfile.read()
tfile.close()
-----------------------------------------------------------------------
Summary of changes:
lang/python/docs/GPGMEpythonHOWTOen.org | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list