plyint / encpass.sh

Lightweight solution for using encrypted passwords in shell scripts
MIT License
598 stars 43 forks source link

Commandline tool #4

Closed etopeter closed 6 years ago

etopeter commented 6 years ago

Proposal to add commandline tool create new password: encpass.sh -s my_key.enc

To get password encpass.sh -g my_key.enc

use in shell scripts . encpass.sh -q

ahnick commented 6 years ago

I had been considering this already. Let me review these changes for POSIX compliance. Ideally I'd like to support this kind of use case, but I'd still like this to work in a wide array of different shells. (csh, zsh, tcsh, etc.) I probably need some kind of test harness for the POSIX compliance. If you have recommendations let me know.

etopeter commented 6 years ago

I know this PR is a bit of a rewrite and changes dynamics of the tool. My aim was to have both functionalities as far as sourcing it in scripts and using functions , and running as a command line tool to create new secrets. This code was tested only on mac. I used getopts POSIX compliant short parameters.