examples: encryption
* Fixed two incorrect Context() objects.
This commit is contained in:
parent
c6a0395f0a
commit
7ddff71908
@ -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()
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user