1234567891011121314151617 |
- import gnupg
- from pathlib import Path
- def encrypt(source_file):
- config_dir = Path().cwd() / "config/gnupg"
- gpg = gnupg.GPG(homedir=config_dir)
-
-
-
- with open(source_file, "rb") as frh:
- result = gpg.encrypt(frh, "942170BF95EA785E8D4A5C94D1839587F0E1C01C", output=str(source_file) + ".gpg")
-
- print(result.stderr)
-
|