updated scripts
This commit is contained in:
parent
736d270364
commit
0b97450366
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user