src/backup/data_blob.rs: new load_from_reader(), which verifies the CRC
And make verify_crc private for now. We always call load_from_reader() to verify the CRC. Also add load_chunk() to datastore.rs (from chunk_store::read_chunk())
This commit is contained in:
@ -50,8 +50,7 @@ fn verify_test_blob(mut cursor: Cursor<Vec<u8>>) -> Result<(), Error> {
|
||||
|
||||
let raw_data = cursor.into_inner();
|
||||
|
||||
let blob = DataBlob::from_raw(raw_data)?;
|
||||
blob.verify_crc()?;
|
||||
let blob = DataBlob::load_from_reader(&mut &raw_data[..])?;
|
||||
|
||||
let data = blob.decode(Some(&CRYPT_CONFIG))?;
|
||||
if data != *TEST_DATA {
|
||||
|
Reference in New Issue
Block a user