examples: encryption

* Fixed two incorrect Context() objects.
This commit is contained in:
Ben McGinnes 2018-03-22 06:05:10 +11:00
parent c6a0395f0a
commit 7ddff71908
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ else:
a_key = input("Enter the fingerprint or key ID to encrypt to: ") a_key = input("Enter the fingerprint or key ID to encrypt to: ")
filename = input("Enter the path and filename to encrypt: ") filename = input("Enter the path and filename to encrypt: ")
rkey = list(c.keylist(pattern=a_key, secret=False)) rkey = list(gpg.Context().keylist(pattern=a_key, secret=False))
with open(filename, "rb") as f: with open(filename, "rb") as f:
text = f.read() text = f.read()

View File

@ -51,7 +51,7 @@ else:
a_key = input("Enter the fingerprint or key ID to encrypt to: ") a_key = input("Enter the fingerprint or key ID to encrypt to: ")
filename = input("Enter the path and filename to encrypt: ") filename = input("Enter the path and filename to encrypt: ")
rkey = list(c.keylist(pattern=a_key, secret=False)) rkey = list(gpg.Context().keylist(pattern=a_key, secret=False))
with open(filename, "rb") as f: with open(filename, "rb") as f:
text = f.read() text = f.read()