1
0
mirror of https://github.com/octoleo/Purse.git synced 2024-06-07 00:40:51 +00:00

Use fd 3 for retrieving password in encrypt function instead of command line arg.

This commit is contained in:
drduh 2015-07-03 14:54:08 -04:00
parent bee78f773f
commit 871f6d25f7

6
pwd.sh
View File

@ -57,11 +57,11 @@ decrypt () {
encrypt () { encrypt () {
# Encrypt with a password. # Encrypt with a password.
# TODO(drduh): don't retrieve passphrase as arg
${gpg} \ ${gpg} \
--symmetric --armor --batch --yes \ --symmetric --armor --batch --yes \
--command-fd 0 --passphrase "${1}" \ --passphrase-fd 3 \
--output "${2}" "${3}" 2>/dev/null --output "${2}" "${3}" 3< <(echo "${1}")
} }