You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import os
|
|
import gnupg
|
|
|
|
home = os.environ['HOME']
|
|
gpg = gnupg.GPG(gnupghome=home+"/.gnupg", use_agent=True)
|
|
|
|
def decrypt_password(file):
|
|
path = home + "/" + file
|
|
f = open(path, 'rb')
|
|
decrypted = gpg.decrypt_file(f)
|
|
return decrypted.data.strip()
|