mirror of https://github.com/octoleo/Purse.git
Use fd 3 for retrieving password in encrypt function instead of command line arg.
This commit is contained in:
parent
bee78f773f
commit
871f6d25f7
6
pwd.sh
6
pwd.sh
|
@ -57,11 +57,11 @@ decrypt () {
|
|||
encrypt () {
|
||||
# Encrypt with a password.
|
||||
|
||||
# TODO(drduh): don't retrieve passphrase as arg
|
||||
|
||||
${gpg} \
|
||||
--symmetric --armor --batch --yes \
|
||||
--command-fd 0 --passphrase "${1}" \
|
||||
--output "${2}" "${3}" 2>/dev/null
|
||||
--passphrase-fd 3 \
|
||||
--output "${2}" "${3}" 3< <(echo "${1}")
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue