exit 1
}
-[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."
[ "x${PASS}" = "x" ] && die "you must set PASS to the password"
RET=0
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
exit 1
}
-[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."
+#[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."
+#SALT=$(dd count=1024 if=/dev/random 2>/dev/null |md5sum|sed 's/-//')
+#[ $? -ne 0 ] && die "failed to generate SALT"
[ "x${PASS}" = "x" ] && die "you must set PASS to the password"
RET=0
echo "Not encrypting ${FILE} because there is already a ${NEW_FILE}"
else
if openssl enc -aes-256-ecb \
- -S "${SALT}" \
+ -salt \
-k "${PASS}" < "${FILE}" > "${NEW_FILE}"; then
echo "Created ${NEW_FILE}"
else