tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

50_integrity.sh (560B)


      1 #!/usr/bin/env zsh
      2 
      3 export test_description="Testing file integrity"
      4 
      5 source ./setup
      6 
      7 test_export "test" # Using already generated tomb
      8 test_expect_success 'Testing contents integrity' '
      9     tt_open --tomb-pwd $DUMMYPASS &&
     10     tt_set_ownership "$MEDIA/$testname" &&
     11     tt dig -s 10 "$MEDIA/$testname/datacheck.raw" &&
     12     CRC1=$(sha256sum "$MEDIA/$testname/datacheck.raw") &&
     13     tt_close --unsafe &&
     14     tt_open --tomb-pwd $DUMMYPASS &&
     15     CRC2=$(sha256sum "$MEDIA/$testname/datacheck.raw") &&
     16     [[ "$CRC1" == "$CRC2" ]] &&
     17     tt_close
     18     '
     19 
     20 test_done