Initial commit
[authen-passphrase-scrypt.git] / scrypt-1.2.1 / tests / 02-decrypt-reference-file.sh
1 #!/bin/sh
2
3 ### Constants
4 c_valgrind_min=1
5 reference_file="${scriptdir}/test_scrypt.good"
6 encrypted_reference_file="${scriptdir}/test_scrypt_good.enc"
7 decrypted_reference_file="${out}/attempt_reference.txt"
8
9 scenario_cmd() {
10 # Decrypt a reference file.
11 setup_check_variables
12 (
13 echo ${password} | ${c_valgrind_cmd} ${bindir}/scrypt \
14 dec -P ${encrypted_reference_file} \
15 ${decrypted_reference_file}
16 echo $? > ${c_exitfile}
17 )
18
19 # The decrypted reference file should match the reference.
20 setup_check_variables
21 if cmp -s ${decrypted_reference_file} ${reference_file}; then
22 echo "0"
23 else
24 echo "1"
25 fi > ${c_exitfile}
26 }
This page took 0.02174 seconds and 4 git commands to generate.