From 2e679167c75c8c9acefabdf1f39661fd22740cfb Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 8 Feb 2023 01:49:06 +0000 Subject: [PATCH] Added environment config for test.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for chacha20's current commit: Blessing − 吉 --- Cargo.lock | 2 +- Cargo.toml | 2 +- test.sh | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64b849b..be2f9f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,7 +34,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "2.0.0" +version = "2.0.1" dependencies = [ "base64", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index e804d68..f841dbc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "chacha20" description = "chacha20_poly1305 encryption tool" -version = "2.0.0" +version = "2.0.1" authors = ["Avril "] edition = "2021" license = "gpl-3.0-or-later" diff --git a/test.sh b/test.sh index 1903026..7526a00 100755 --- a/test.sh +++ b/test.sh @@ -8,6 +8,7 @@ mkdir -p test || exit -1 cd test || exit -1 PROG=../target/${1:-release}/chacha20 +TEST_ENV="${TEST_ENV:-""}" if [[ ! -f $PROG ]]; then echo "Couldn't find executable \"$PROG\"" @@ -27,9 +28,9 @@ KEYS=$($PROG k) echo "$KEYS" echo ">>> Encrypting" -time $PROG e $KEYS < test.txt > test.cc20 || exit 1 +time $TEST_ENV $PROG e $KEYS < test.txt > test.cc20 || exit 1 echo ">>> Decrypting" -time $PROG d $KEYS < test.cc20 > test.out.txt || exit 2 +time $TEST_ENV $PROG d $KEYS < test.cc20 > test.out.txt || exit 2 echo ">>> Comparing" echo "Input (SHA256 sum): $(sha256sum test.txt)"