Source code for fact.encrypt_credentials

from getpass import getpass
import simplecrypt

[docs]def decrypt(inpath, outpath): password = getpass() with open(inpath, 'rb') as infile, open(outpath, 'wb') as outfile: outfile.write( simplecrypt.decrypt(password, infile.read()) )
[docs]def encrypt(inpath, outpath): password = getpass() with open(inpath, 'rb') as infile, open(outpath, 'wb') as outfile: outfile.write( simplecrypt.encrypt(password, infile.read()) )