]>
iEval git - authen-passphrase-scrypt.git/blob - scrypt-1.2.1/tests/03-encrypt-decrypt-file.sh
5 reference_file
="${scriptdir}/test_scrypt.good"
6 encrypted_file
="${out}/attempt.enc"
7 decrypted_file
="${out}/attempt.txt"
13 echo ${password} | ${c_valgrind_cmd} ${bindir}/scrypt \
14 enc
-P -t 1 ${reference_file} ${encrypted_file}
15 echo $?
> ${c_exitfile}
18 # The encrypted file should be different from the original file.
19 # We cannot check against the "reference" encrypted file, because
20 # encrypted files include random salt. If successful, don't delete
21 # ${encrypted_file} yet; we need it for the next test.
23 if cmp -s ${encrypted_file} ${reference_file}; then
29 # Decrypt the file we just encrypted.
32 echo ${password} | ${c_valgrind_cmd} ${bindir}/scrypt \
33 dec
-P ${encrypted_file} ${decrypted_file}
34 echo $?
> ${c_exitfile}
37 # The decrypted file should match the reference.
39 if cmp -s ${decrypted_file} ${reference_file}; then
This page took 0.041502 seconds and 5 git commands to generate.