INNER CODE UNIT · C++
size
7thSamurai/steganography · src/main.cpp:233
std::size_t size = header.size - left;
std::cout << "* Decrypted embed size: " << data_size(size) << std::endl;
// Calculate the CRC32 hash
CRC32 crc;
crc.update(padded_data, size);
// Make sure that the data matches
if (crc.get_hash() != header.hash) {
std::cerr << "ERROR: File is corrupted!" << std::endl;
return -1;
}
std::cout << "* CRC32 checksum matches" << std::endl;
// If the output path is empty, just use the embedded file name
if (output.empty())