This commit is contained in:
yanczi 2025-10-24 13:26:36 +02:00
parent 8b9a1789ab
commit 729cb13ff8
8 changed files with 71 additions and 10 deletions

View file

@ -224,7 +224,7 @@ std::vector<FilesTable> CreateCargo::ComputingHeadFiles()
f.close();
//Tworzenie hashu CRC
uint64_t crc = XXH64(buffor.data(), buffor.size(), VERSION);
uint32_t crc = crc32(buffor);
//Kompresjia
std::vector<char> zip;
@ -331,6 +331,16 @@ uint64_t CreateCargo::fnv64(const std::string& data)
return hash;
}
//-----------------------------------------------------------------------------
// Wygenerój CRC32 HASH integralnoœci
//-----------------------------------------------------------------------------
uint32_t CreateCargo::crc32(const std::vector<char>& buffer)
{
boost::crc_32_type crc;
crc.process_bytes(buffer.data(), buffer.size());
return crc.checksum();
}
//-----------------------------------------------------------------------------
// Sprawdzanie czy plik znajduje się na liście
//-----------------------------------------------------------------------------