VHISTlib
1.84.0.3018
|
This example shows how to use the vhist::Validator.
/* $HEADERS $Id: validator_example.cpp 2179 2011-06-24 09:03:24Z ahuesgen $ */ #include <unvhistlib/validator.h> // ... // create and initialize the validator vhist::Validator validator; validator.reinit(expectedMD5, expectedCompressedMD5); // pass the complete datastream in chunks to the validator while (moreData()) { QByteArray data = getNextBytes(); validator.update(data); } // test if the validator is valid if (validator.isValid()) std::cout << "datastream is valid" << std::endl; else std::cout << "datastream is invalid" << std::endl;