import gnupg


def encrypt(source_file):
    base_dir = '/home/robert/projekte/python/planner/gnupg/'

    gpg = gnupg.GPG(gnupghome=base_dir)
    # gpg.import_keys(base_dir + 'export.gpg')
    # public_keys = gpg.list_keys()

    with open(source_file, 'rb') as frh:
        gpg.encrypt_file(frh, 'BV_IFC; BMW Group <BV_IFC@softlab.de>', output=source_file + '.gpg')


if __name__ == '__main__':
    encrypt('/home/robert/projekte/python/planner/HBV/HB0014432021000103351024032021112656.dat')