From 0b974503663b860c59a06163bec63a624ba4ea4a Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 17 Jan 2021 17:45:09 +0100 Subject: [PATCH] updated scripts --- scripts/encrypt_password.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/encrypt_password.py b/scripts/encrypt_password.py index 441d966..0aa69ea 100755 --- a/scripts/encrypt_password.py +++ b/scripts/encrypt_password.py @@ -3,9 +3,11 @@ import argparse import gnupg + KEYID = "salt" GPGHOME = "/etc/salt/gpgkeys" + def parse_args(): parser = argparse.ArgumentParser(description='Encrypt password') parser.add_argument('password', type=str, nargs=1, @@ -13,6 +15,7 @@ def parse_args(): args = parser.parse_args() return args + def encrypt(password=""): gpg = gnupg.GPG(gnupghome=GPGHOME, secret_keyring=KEYID) encrypted_password = gpg.encrypt(password, KEYID)