crc
This commit is contained in:
parent
8b9a1789ab
commit
729cb13ff8
8 changed files with 71 additions and 10 deletions
|
|
@ -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
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue