Makefile: add pickrand
[cmccabe-bin] / dec.sh
diff --git a/dec.sh b/dec.sh
index ef4aaa1..d5c2709 100755 (executable)
--- a/dec.sh
+++ b/dec.sh
@@ -5,8 +5,9 @@ die() {
     exit 1
 }
 
-[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."
-[ "x${PASS}" = "x" ] && die "you must set PASS to the password"
+if [[ "x${PASS}" = "x" ]]; then
+    read -s -p "enter password: " PASS
+fi
 
 RET=0
 for FILE in "$@"; do
@@ -16,7 +17,6 @@ for FILE in "$@"; do
             echo "Not decrypting $FILE because there is already a ${BASE_FILE}"
         else
             if openssl enc -d -aes-256-ecb \
-                    -S "$SALT" \
                     -k "$PASS" < "${FILE}" > "${BASE_FILE}"; then
                 echo "Created ${BASE_FILE}"
             else