Merge pull request #6 from adam12/encrypted-file-overwrites-source
Append extension during encryption
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
- Justin Keller ([nodesocket](https://github.com/nodesocket))
|
- Justin Keller ([nodesocket](https://github.com/nodesocket))
|
||||||
- Manuel Wildauer ([int9h](https://github.com/int9h))
|
- Manuel Wildauer ([int9h](https://github.com/int9h))
|
||||||
|
- Adam Daniels ([adam12](https://github.com/adam12))
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
## 2.1.2 - *7/10/2020*
|
||||||
|
|
||||||
|
- Append `.aes` file extension instead of substituting when encrypting
|
||||||
|
|
||||||
## 2.1.1 - *3/25/2019*
|
## 2.1.1 - *3/25/2019*
|
||||||
|
|
||||||
- Updated the notice text when using environment variable `CRYPTR_PASSWORD` for the password.
|
- Updated the notice text when using environment variable `CRYPTR_PASSWORD` for the password.
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||||
|
|
||||||
readonly VERSION="2.1.1"
|
readonly VERSION="2.1.2"
|
||||||
readonly OPENSSL_CIPHER_TYPE="aes-256-cbc"
|
readonly OPENSSL_CIPHER_TYPE="aes-256-cbc"
|
||||||
|
|
||||||
cryptr_version() {
|
cryptr_version() {
|
||||||
@@ -46,9 +46,9 @@ cryptr_encrypt() {
|
|||||||
|
|
||||||
if [[ ! -z "${CRYPTR_PASSWORD}" ]]; then
|
if [[ ! -z "${CRYPTR_PASSWORD}" ]]; then
|
||||||
echo "[notice] using environment variable CRYPTR_PASSWORD for the password"
|
echo "[notice] using environment variable CRYPTR_PASSWORD for the password"
|
||||||
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file%\.aes}" -pass env:CRYPTR_PASSWORD
|
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file}.aes" -pass env:CRYPTR_PASSWORD
|
||||||
else
|
else
|
||||||
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file%\.aes}"
|
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file}.aes"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user