blob: 7d0bc0d94f5fa010d9e14b568e1a540f774bca27 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env bash
SEED=$(seq 1 10 | shuf --random-source=/dev/urandom | sed -z 's/\n//g')
echo "Encryption seed: ${SEED}"
gcc -Wall -Werror -pedantic -O2 -mavx2 -march=x86-64-v3 -std=gnu23 ./test_binary.c -o ./test_binary
gcc -Wall -Werror -pedantic -O2 -mavx2 -march=x86-64-v3 -std=gnu23 -DSEED_VAL=${SEED} ./encrypter.c -o ./encrypter
./encrypter
rm ./encrypter
xxd -g1 -p ./test_binary | sed -z 's/\n$/\"/;s/^/\"/;s/\n//g' > ./test_binary_hex.dat
rm ./test_binary
gcc -O2 -mavx2 -march=x86-64-v3 -std=gnu23 -DSEED_VAL=${SEED} -DBIN_HEX=$(cat ./test_binary_hex.dat) ./extractor.c -o ./extractor
rm ./test_binary_hex.dat
|