From 2590a5afe800286515040240559807f91ec5c84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Sun, 12 Jan 2025 19:07:27 +0500 Subject: [PATCH] Bruh + strip newlines from encrypted messsages. --- dobroho_vechora.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dobroho_vechora.bash b/dobroho_vechora.bash index 5ad75c3..30d9faf 100755 --- a/dobroho_vechora.bash +++ b/dobroho_vechora.bash @@ -67,7 +67,7 @@ encrypt() { cat return 0 fi - echo "ENCRYPTED"'!'"<$(openssl enc -pbkdf2 -A -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD)>" + echo "ENCRYPTED"'!'"<$(openssl enc -pbkdf2 -a -A -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD)>" } decrypt() { @@ -81,7 +81,7 @@ decrypt() { cipher="$(echo "${i}" | grep -Po 'ENCRYPTED!<\K([a-zA-Z0-9\=\+\/]*)(?=\>)')" || : if [ -n "${cipher}" ]; then echo -n "Decrypted: " - echo "$(echo "${cipher}" | openssl enc -pbkdf2 -d -A -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD || :)" + echo "$(echo "${cipher}" | openssl enc -pbkdf2 -d -a -A -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD | tr -d '\n')" fi done }