example: encrypt file
* Fixed typo in second encryption call.
This commit is contained in:
parent
7ab42e79ad
commit
f0790f224d
@ -58,7 +58,7 @@ with gpg.Context(armor=True) as ca:
|
|||||||
fa.write(ciphertext)
|
fa.write(ciphertext)
|
||||||
|
|
||||||
with gpg.Context() as cg:
|
with gpg.Context() as cg:
|
||||||
ciphertext, result, sign_result = ca.encrypt(text, recipients=rkey,
|
ciphertext, result, sign_result = cg.encrypt(text, recipients=rkey,
|
||||||
sign=False)
|
sign=False)
|
||||||
with open("{0}.gpg".format(filename), "wb") as fg:
|
with open("{0}.gpg".format(filename), "wb") as fg:
|
||||||
fg.write(ciphertext)
|
fg.write(ciphertext)
|
||||||
|
Loading…
Reference in New Issue
Block a user