7 Commits

Author SHA1 Message Date
Justin
77d39c1bc3 release 2.2.0 2020-07-10 15:48:08 -05:00
Justin Keller
3267969668 Merge pull request #6 from adam12/encrypted-file-overwrites-source
Append extension during encryption
2020-07-10 15:41:14 -05:00
Adam Daniels
358f631cbb Prepare for 2.1.2 release 2020-07-10 14:57:04 -04:00
Adam Daniels
3421864c38 Append extension during encryption 2020-07-10 12:14:36 -04:00
Justin Keller
05ff65d6e3 Merge pull request #3 from Darkitty/master
Update `openssl` command to follow recommandation
2019-06-30 15:12:15 -05:00
Nicolas Le Gall
36619f7ee0 Fix filename output 2019-06-27 00:29:35 +02:00
Nicolas Le Gall
e9576d180c Update openssl command to follow recommandation 2019-06-27 00:07:59 +02:00
4 changed files with 14 additions and 7 deletions

View File

@@ -1,2 +1,4 @@
- Justin Keller ([nodesocket](https://github.com/nodesocket))
- Manuel Wildauer ([int9h](https://github.com/int9h))
- Adam Daniels ([adam12](https://github.com/adam12))
- Nicolas Le Gall ([Darkitty](https://github.com/Darkitty))

View File

@@ -1,6 +1,11 @@
CHANGELOG
=========
## 2.2.0 - *7/10/2020*
- Append `.aes` file extension instead of substituting when encrypting.
- Use derivation function _(-pbkdf2)_ when encrypting. See [pull request](https://github.com/nodesocket/cryptr/pull/3).
## 2.1.1 - *3/25/2019*
- Updated the notice text when using environment variable `CRYPTR_PASSWORD` for the password.

View File

@@ -84,7 +84,7 @@ Usage: cryptr command <command-specific-options>
```
➜ cryptr version
cryptr 2.1.1
cryptr 2.2.0
```
### default
@@ -93,7 +93,7 @@ cryptr 2.1.1
```
➜ cryptr
cryptr 2.1.1
cryptr 2.2.0
Usage: cryptr command <command-specific-options>

View File

@@ -18,7 +18,7 @@
set -eo pipefail; [[ $TRACE ]] && set -x
readonly VERSION="2.1.1"
readonly VERSION="2.2.0"
readonly OPENSSL_CIPHER_TYPE="aes-256-cbc"
cryptr_version() {
@@ -46,9 +46,9 @@ cryptr_encrypt() {
if [[ ! -z "${CRYPTR_PASSWORD}" ]]; then
echo "[notice] using environment variable CRYPTR_PASSWORD for the password"
openssl $OPENSSL_CIPHER_TYPE -salt -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
openssl $OPENSSL_CIPHER_TYPE -salt -in "$_file" -out "$_file".aes
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file}.aes"
fi
}
@@ -61,9 +61,9 @@ local _file="$1"
if [[ ! -z "${CRYPTR_PASSWORD}" ]]; then
echo "[notice] using environment variable CRYPTR_PASSWORD for the password"
openssl $OPENSSL_CIPHER_TYPE -d -salt -in "$_file" -out "${_file%\.aes}" -pass env:CRYPTR_PASSWORD
openssl $OPENSSL_CIPHER_TYPE -d -salt -pbkdf2 -in "$_file" -out "${_file%\.aes}" -pass env:CRYPTR_PASSWORD
else
openssl $OPENSSL_CIPHER_TYPE -d -salt -in "$_file" -out "${_file%\.aes}"
openssl $OPENSSL_CIPHER_TYPE -d -salt -pbkdf2 -in "$_file" -out "${_file%\.aes}"
fi
}