You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
413 B

#!/bin/bash
for ((i = 0; i < $1; i++)); do
head -c 267K </dev/urandom >rdata
original_hash=$(sha1sum rdata | cut -d " " -f 1)
./dip -h giedre.png rdata hdata.png
./dip -e hdata.png odata
extracted_hash=$(sha1sum odata | cut -d " " -f 1)
if [[ "$original_hash" == "$extracted_hash" ]]; then
echo hash ok
else
echo hash fail
echo "> $original_hash"
echo "< $extracted_hash"
fi
done