Skip to content

Commit

Permalink
Fix bash tests for BSD/Mac base64
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Feb 6, 2022
1 parent 5c8fc71 commit 7d5cf2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bench/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ if [ "$t" = "" -o "$t" = "create_parallel" ]; then
fi

function write_md5 {
seed=$(dd if=/dev/urandom bs=128 count=1 status=none | base64 -w 0)
if ! base64 -w 0 </dev/null; then
# BSD base64
seed=$(dd if=/dev/urandom bs=128 count=1 status=none | base64)
else
seed=$(dd if=/dev/urandom bs=128 count=1 status=none | base64 -w 0)
fi
random_cmd="openssl enc -aes-256-ctr -pbkdf2 -pass pass:$seed -nosalt"
count=1000
if [ "$FAST" == "true" ]; then
Expand Down

0 comments on commit 7d5cf2a

Please sign in to comment.