Do not produce newlines with openssl.
This commit is contained in:
parent
e4e1c71c23
commit
67e6a626f9
@ -67,7 +67,7 @@ encrypt() {
|
|||||||
cat
|
cat
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
echo "ENCRYPTED"'!'"<$(openssl enc -pbkdf2 -a -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD)>"
|
echo "ENCRYPTED"'!'"<$(openssl enc -pbkdf2 -A -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD)>"
|
||||||
}
|
}
|
||||||
|
|
||||||
decrypt() {
|
decrypt() {
|
||||||
@ -81,7 +81,7 @@ decrypt() {
|
|||||||
cipher="$(echo "${i}" | grep -Po 'ENCRYPTED!<\K([a-zA-Z0-9\=\+\/]*)(?=\>)')" || :
|
cipher="$(echo "${i}" | grep -Po 'ENCRYPTED!<\K([a-zA-Z0-9\=\+\/]*)(?=\>)')" || :
|
||||||
if [ -n "${cipher}" ]; then
|
if [ -n "${cipher}" ]; then
|
||||||
echo -n "Decrypted: "
|
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 -aes256 -pass env:DOBROHO_VECHORA_ENCRYPTION_PASSWORD || :)"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user