You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"${0##*/}: e.g. ${0##*/} file1.txt file2.jpg # encrypt 2 files"
68
71
echo"${0##*/}: e.g. ${0##*/} # read from stdin, encrypt text from stdin input"
@@ -81,11 +84,11 @@ usage() {
81
84
echo"${0##*/}: If no file is provided as command line argument, script will read "
82
85
echo"${0##*/}: plain-text from std input."
83
86
echo"${0##*/}: "
84
-
echo"${0##*/}: If a file named \"passphrase-file-aes\" exists in the local"
87
+
echo"${0##*/}: If a file named \"$PASSPHRASE_FILE_AES_FILE\" exists in the local"
85
88
echo"${0##*/}: directory, then it will be used as passphrase source instead of stdin"
86
89
echo"${0##*/}: for the AES-round (first round) of encryption."
87
90
echo"${0##*/}: "
88
-
echo"${0##*/}: If a file named \"passphrase-file-twofish\" exists in the local"
91
+
echo"${0##*/}: If a file named \"$PASSPHRASE_FILE_TWOFISH_FILE\" exists in the local"
89
92
echo"${0##*/}: directory, then it will be used as passphrase source instead of stdin"
90
93
echo"${0##*/}: for the TwoFish-round (second round) of encryption."
91
94
echo"${0##*/}: "
@@ -97,9 +100,10 @@ usage() {
97
100
echo"${0##*/}: Decrypt does the opposite. It recovers the plaintext from the ciphertext."
98
101
echo"${0##*/}: TLDR: The whole decryption script in a nutshell does the 3 lines of code from above in the reverse order but with --decrypt instead of --symmetric."
99
102
echo""
100
-
echo""
101
-
echo"Typical encryption process looks similar to this: "
102
-
cat <<END
103
+
if [ "$DEBUG"=="true" ];then
104
+
echo""
105
+
echo"Typical encryption process looks similar to this: "
106
+
cat <<END
103
107
$ ./${0##*/}
104
108
${0##*/}: Verified that version 2 of GPG is installed. Passed check.
105
109
${0##*/}: Install latest version of "gpg" (version 2), "sha512sum", "shred" and "qrencode"!
echo"${0##*/}: Info: Found file \"$PASSPHRASE_FILE_AES_FILE\". It will be used as source for the AES passphrase. You will not be asked for a passphrase for AES $1."
187
192
else
193
+
echo"${0##*/}: Info: File \"$PASSPHRASE_FILE_AES_FILE\" not found. It cannot be used as source for the AES passphrase. You will be asked for a passphrase for AES $1."
188
194
PASSPHRASE_FILE_AES_OPTION=""# don't use this option
189
195
fi
190
196
if [ -f"$PASSPHRASE_FILE_TWOFISH_FILE" ];then
191
197
echo"${0##*/}: Info: Found file \"$PASSPHRASE_FILE_TWOFISH_FILE\". It will be used as source for the TwoFish passphrase. You will not be asked for a passphrase for TwoFish $1."
192
198
else
199
+
echo"${0##*/}: Info: File \"$PASSPHRASE_FILE_TWOFISH_FILE\" not found. It cannot be used as source for the TwoFish passphrase. You will be asked for a passphrase for TwoFish $1."
193
200
PASSPHRASE_FILE_TWOFISH_OPTION=""# don't use this option
0 commit comments