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)