diff options
author | Ben McGinnes <[email protected]> | 2018-03-13 04:03:11 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-03-13 04:03:11 +0000 |
commit | f29bda8d7146b4bc0bf73d6e613131545ff86b73 (patch) | |
tree | 45eb2e33ea22c360e80227b5e8074dbc33afe0c4 /lang/python/docs/GPGMEpythonHOWTOen.org | |
parent | doc: python bindings howto (diff) | |
download | gpgme-f29bda8d7146b4bc0bf73d6e613131545ff86b73.tar.gz gpgme-f29bda8d7146b4bc0bf73d6e613131545ff86b73.zip |
doc: python bindings howto
* Signatures have changed as a result of the recent update from Justus.
* Sample code updated.
* Text to follow later.
Diffstat (limited to 'lang/python/docs/GPGMEpythonHOWTOen.org')
-rw-r--r-- | lang/python/docs/GPGMEpythonHOWTOen.org | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org index 40d28140..5d259a6c 100644 --- a/lang/python/docs/GPGMEpythonHOWTOen.org +++ b/lang/python/docs/GPGMEpythonHOWTOen.org @@ -503,13 +503,13 @@ #+begin_src python import gpg - text = """Declaration of ... something. + text = b"""Declaration of ... something. """ c = gpg.Context() c.armor = True - signed = c.sign(text, mode=mode.NORMAL) + signed = c.sign(text, mode=0) afile = open("/path/to/statement.txt.asc", "w") for i in range(len(signed[0].splitlines())): @@ -527,8 +527,7 @@ """ c = gpg.Context() - c.armor = True - signed = c.sign(text, mode=mode.CLEAR) + signed = c.sign(text, mode=2) afile = open("/path/to/statement.txt.asc", "w") for i in range(len(signed[0].splitlines())): @@ -547,7 +546,7 @@ c = gpg.Context() c.armor = True - signed = c.sign(text, mode=mode.DETACH) + signed = c.sign(text, mode=1) afile = open("/path/to/statement.txt.asc", "w") for i in range(len(signed[0].splitlines())): @@ -566,7 +565,7 @@ c = gpg.Context() c.armor = True - signed = c.sign(text, mode=mode.DETACH) + signed = c.sign(text, mode=1) afile = open("/path/to/statement.txt.sig", "wb") afile.write(signed[0]) |