diff options
author | Ben McGinnes <[email protected]> | 2018-08-13 16:55:56 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-08-13 16:55:56 +0000 |
commit | 279cac0ffbb3d865d997dc7fc9c1b53bbb55d3a2 (patch) | |
tree | 8b48f50b322d2fa0f39550421ffcb44b5a0bcef9 /lang/python/examples/howto/symcrypt-file.py | |
parent | Symmetric encryption example (diff) | |
download | gpgme-279cac0ffbb3d865d997dc7fc9c1b53bbb55d3a2.tar.gz gpgme-279cac0ffbb3d865d997dc7fc9c1b53bbb55d3a2.zip |
Symmetric example
* lang/python/examples/howto/symcrypt-file.py: *sigh*; passphrase was
right the first time, just the error check that wasn't.
* I really should stop second guessing myself one of these days ...
Signed-off-by: Ben McGinnes <[email protected]>
Diffstat (limited to 'lang/python/examples/howto/symcrypt-file.py')
-rwxr-xr-x | lang/python/examples/howto/symcrypt-file.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/python/examples/howto/symcrypt-file.py b/lang/python/examples/howto/symcrypt-file.py index 2e6ece4b..785a4d04 100755 --- a/lang/python/examples/howto/symcrypt-file.py +++ b/lang/python/examples/howto/symcrypt-file.py @@ -46,7 +46,7 @@ with open(filename, "rb") as f: with gpg.Context(armor=True) as ca: try: - ciphertext, result, sign_result = ca.encrypt(text, passphrase=True, + ciphertext, result, sign_result = ca.encrypt(text, passphrase=None, sign=False) with open("{0}.asc".format(filename), "wb") as fa: fa.write(ciphertext) @@ -55,7 +55,7 @@ with gpg.Context(armor=True) as ca: with gpg.Context() as cg: try: - ciphertext, result, sign_result = cg.encrypt(text, passphrase=True, + ciphertext, result, sign_result = cg.encrypt(text, passphrase=None, sign=False) with open("{0}.gpg".format(filename), "wb") as fg: fg.write(ciphertext) |