Home
last modified time | relevance | path

Searched refs:crc (Results 1 – 14 of 14) sorted by relevance

/base/hiviewdfx/hiview/base/event_store/utility/crc/
Dcrc_generator.cpp34 uint32_t crc = i << 24; // 24: get the lowest byte in Initialize() local
36 if ((crc & 0x80000000) != 0) { // 0x80000000: get the highest bit in Initialize()
37 crc = polynomial ^ (crc << 1); // 1: subtract the highest bit in Initialize()
39 crc = crc << 1; // 1: too in Initialize()
42 crcTable_[i] = crc; in Initialize()
49 uint32_t crc = 0x0; in GetCrc32() local
52crc = (crc << 8) ^ crcTable_[((crc >> 24) ^ data) & 0x000000FF]; // 8,24,0x000000FF: calc crc value in GetCrc32()
54 return crc; in GetCrc32()
/base/update/updater/services/package/pkg_algorithm/
Dpkg_algo_deflate.cpp68 uint32_t crc = 0; in PackCalculate() local
71 PkgBuffer crcResult((uint8_t *)&crc, sizeof(crc)); in PackCalculate()
102 context.crc = crc; in PackCalculate()
138 int32_t PkgAlgoDeflate::CalculateUnpackData(z_stream &zstream, uint32_t &crc, int32_t &ret, in CalculateUnpackData() argument
144 if (context.crc != 0 && context.crc != crc) { in CalculateUnpackData()
145 PKG_LOGE("crc fail %u %u!", crc, context.crc); in CalculateUnpackData()
148 context.crc = crc; in CalculateUnpackData()
164 uint32_t crc = 0; in UnpackCalculate() local
166 PkgBuffer crcResult((uint8_t *)&crc, sizeof(crc)); in UnpackCalculate()
194 return CalculateUnpackData(zstream, crc, unpack_ret, context, unpackContext); in UnpackCalculate()
Dpkg_algorithm.h48 uint32_t crc = 0; member
52 …PkgAlgorithmContext(PkgContextOffset offset, PkgContextSize size, uint32_t crc, uint8_t digestMeth… in PkgAlgorithmContext()
58 this->crc = crc; in PkgAlgorithmContext()
Dpkg_algo_digest.cpp85 auto crc = reinterpret_cast<uint32_t *>(result.buffer); in Calculate() local
87 *crc = crc32(*crc, buffer.buffer, size); in Calculate()
Dpkg_algo_deflate.h50 int32_t CalculateUnpackData(z_stream &zstream, uint32_t &crc, int32_t &ret,
/base/update/updater/test/unittest/package/
Dpkg_algo_unittest.cpp50 uint32_t crc = 0; in TestCrcDigest() local
51 PkgBuffer crcResult(reinterpret_cast<uint8_t *>(&crc), sizeof(crc)); in TestCrcDigest()
56 crcResult = {reinterpret_cast<uint8_t *>(&crc2), sizeof(crc)}; in TestCrcDigest()
59 EXPECT_EQ(crc, crc2); in TestCrcDigest()
/base/hiviewdfx/hiview/base/event_store/utility/writer/
Dsys_event_doc_writer.cpp158 .crc = CRC_INIT_VALUE, in WriteHeader()
163 … header.crc = CrcGenerator::GetCrc32(reinterpret_cast<uint8_t*>(&header), HEADER_SIZE - CRC_SIZE); in WriteHeader()
214 …uint32_t crc = CrcGenerator::GetCrc32(reinterpret_cast<uint8_t*>(content), contentSize - CRC_SIZE); in BuildContent() local
215 if (CopyValue(content + pos, contentSize, crc) != EOK) { in BuildContent()
216 HIVIEW_LOGE("failed to write crc=%{public}u", crc); in BuildContent()
/base/hiviewdfx/hiview/base/event_store/utility/
DBUILD.gn24 "crc/include",
34 "crc/crc_generator.cpp",
/base/hiviewdfx/hiview/base/event_store/utility/reader/
Dsys_event_doc_reader.cpp237 … uint32_t crc = CrcGenerator::GetCrc32(reinterpret_cast<uint8_t*>(const_cast<DocHeader*>(&header)), in IsValidHeader() local
239 if (header.crc != crc) { in IsValidHeader()
248 uint32_t crc = CrcGenerator::GetCrc32(content, contentSize - CRC_SIZE); in IsValidContent() local
252 if (contentCrc != crc) { in IsValidContent()
254 contentCrc, crc, docPath_.c_str()); in IsValidContent()
/base/update/updater/services/package/pkg_package/
Dpkg_zipfile.h43 uint32_t crc = 0; member
77 uint32_t crc = 0; member
102 uint32_t crc = 0; member
Dpkg_gzipfile.cpp158 WriteLE32(buffer.buffer, context.crc); in Pack()
183 if (crc32_ != context.crc) { in CheckFileInfo()
184 PKG_LOGE("Crc error %u %u", crc32_, context.crc); in CheckFileInfo()
189 PKG_LOGE("Crc error %u %u", crc32_, context.crc); in CheckFileInfo()
Dpkg_zipfile.cpp319 crc32_ = context.crc; in PackStream()
382 centralDir->crc = crc32_; in EncodeCentralDirEntry()
425 header->crc = crc32_; in EncodeLocalFileHeader()
434 header->crc = 0u; in EncodeLocalFileHeader()
446 dataDesc.crc = crc32_; in EncodeDataDescriptor()
467 crc32_ = ReadLE32(buffer.buffer + offsetof(CentralDirEntry, crc)); in DoDecodeCentralDirEntry()
549 uint32_t crc32 = ReadLE32(data.buffer + offsetof(LocalFileHeader, crc)); in DecodeLocalFileHeaderCheck()
570 crc32 = ReadLE32(data.buffer + offsetof(DataDescriptor, crc)); in DecodeLocalFileHeaderCheck()
/base/hiviewdfx/hiview/base/event_store/include/
Dbase_def.h86 uint32_t crc = 0; member
/base/update/sys_installer/services/module_update/util/src/
Dmodule_zip_helper.cpp36 uint32_t crc = 0; member
51 uint32_t crc = 0; member