[git] GPGME - branch, ben/docs/2018-03, updated. gpgme-1.10.0-100-g22e2445
by Ben McGinnes
cvs at cvs.gnupg.org
Thu Mar 15 15:51:25 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 22e2445beee46ed1e527a98e635153c7cf03786f (commit)
via 94a95ac12364989db7f4be333107f3c023551857 (commit)
from 3d0c7a2202c8e9bd4f284fd00069d34b8d3d3d4c (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 22e2445beee46ed1e527a98e635153c7cf03786f
Author: Ben McGinnes <ben at adversary.org>
Date: Fri Mar 16 01:48:56 2018 +1100
doc: python bindings howto
* fixed custom_id for decryption so the XHTML validates.
diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org
index 30e1018..4aa4398 100644
--- a/lang/python/docs/GPGMEpythonHOWTOen.org
+++ b/lang/python/docs/GPGMEpythonHOWTOen.org
@@ -677,7 +677,7 @@
** Decryption
:PROPERTIES:
- :CUSTOM_ID: howto-basic-encryption
+ :CUSTOM_ID: howto-basic-decryption
:END:
Decrypting something encrypted to a key in one's secret keyring is
commit 94a95ac12364989db7f4be333107f3c023551857
Author: Ben McGinnes <ben at adversary.org>
Date: Fri Mar 16 01:34:22 2018 +1100
doc: python bindings howto
* Promoted final encryption example so that it will appear as heading
6.1.3 when exported to HTML or PDF.
diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org
index 71e738a..30e1018 100644
--- a/lang/python/docs/GPGMEpythonHOWTOen.org
+++ b/lang/python/docs/GPGMEpythonHOWTOen.org
@@ -608,71 +608,71 @@
This will attempt to encrypt to all the keys searched for, then
remove invalid recipients if it fails and try again.
-**** Encrypting to one key using the second method
- :PROPERTIES:
- :CUSTOM_ID: howto-basic-encryption-monogamous
- :END:
+*** Encrypting to one key using the second method
+ :PROPERTIES:
+ :CUSTOM_ID: howto-basic-encryption-monogamous
+ :END:
- This example re-creates the first encryption example except it
- uses the same =encrypt= method used in the subsequent examples
- instead of the =op_encrypt= method. This means that, unlike the
- =op_encrypt= method, it /must/ use byte literal input data.
+ This example re-creates the first encryption example except it
+ uses the same =encrypt= method used in the subsequent examples
+ instead of the =op_encrypt= method. This means that, unlike the
+ =op_encrypt= method, it /must/ use byte literal input data.
- #+begin_src python
- import gpg
+ #+begin_src python
+ import gpg
- rkey = "0x12345678DEADBEEF"
- text = b"""Some text to test with.
+ rkey = "0x12345678DEADBEEF"
+ text = b"""Some text to test with.
- Since the text in this case must be bytes, it is most likely that
- the input form will be a separate file which is opened with "rb"
- as this is the simplest method of obtaining the correct data
- format.
- """
+ Since the text in this case must be bytes, it is most likely that
+ the input form will be a separate file which is opened with "rb"
+ as this is the simplest method of obtaining the correct data
+ format.
+ """
- c = gpg.Context(armor=True)
- rpattern = list(c.keylist(pattern=rkey, secret=False))
- logrus = []
+ c = gpg.Context(armor=True)
+ rpattern = list(c.keylist(pattern=rkey, secret=False))
+ logrus = []
- for i in range(len(rpattern)):
- if rpattern[i].can_encrypt == 1:
- logrus.append(rpattern[i])
+ for i in range(len(rpattern)):
+ if rpattern[i].can_encrypt == 1:
+ logrus.append(rpattern[i])
- cipher = c.encrypt(text, recipients=logrus, sign=False, always_trust=True)
+ cipher = c.encrypt(text, recipients=logrus, sign=False, always_trust=True)
- afile = open("secret_plans.txt.asc", "wb")
- afile.write(cipher[0])
- afile.close()
- #+end_src
+ afile = open("secret_plans.txt.asc", "wb")
+ afile.write(cipher[0])
+ afile.close()
+ #+end_src
- With one or two exceptions, this method will probably prove to be
- easier to implement than the first method and thus it is the
- recommended encryption method. Though it is even more likely to
- be used like this:
+ With one or two exceptions, this method will probably prove to be
+ easier to implement than the first method and thus it is the
+ recommended encryption method. Though it is even more likely to
+ be used like this:
- #+begin_src python
- import gpg
+ #+begin_src python
+ import gpg
- rkey = "0x12345678DEADBEEF"
+ rkey = "0x12345678DEADBEEF"
- afile = open("secret_plans.txt", "rb")
- text = afile.read()
- afile.close()
+ afile = open("secret_plans.txt", "rb")
+ text = afile.read()
+ afile.close()
- c = gpg.Context(armor=True)
- rpattern = list(c.keylist(pattern=rkey, secret=False))
- logrus = []
+ c = gpg.Context(armor=True)
+ rpattern = list(c.keylist(pattern=rkey, secret=False))
+ logrus = []
- for i in range(len(rpattern)):
- if rpattern[i].can_encrypt == 1:
- logrus.append(rpattern[i])
+ for i in range(len(rpattern)):
+ if rpattern[i].can_encrypt == 1:
+ logrus.append(rpattern[i])
- cipher = c.encrypt(text, recipients=logrus, sign=False, always_trust=True)
+ cipher = c.encrypt(text, recipients=logrus, sign=False, always_trust=True)
- afile = open("secret_plans.txt.asc", "wb")
- afile.write(cipher[0])
- afile.close()
- #+end_src
+ afile = open("secret_plans.txt.asc", "wb")
+ afile.write(cipher[0])
+ afile.close()
+ #+end_src
** Decryption
-----------------------------------------------------------------------
Summary of changes:
lang/python/docs/GPGMEpythonHOWTOen.org | 100 ++++++++++++++++----------------
1 file changed, 50 insertions(+), 50 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org
More information about the Gnupg-commits
mailing list