/base/update/updater/services/package/pkg_algorithm/ |
D | pkg_algo_digest.h | 42 virtual int32_t Update(const PkgBuffer &buffer, size_t size) in Update() 48 virtual int32_t Final(PkgBuffer &buffer) in Final() 54 virtual int32_t Calculate(PkgBuffer &result, const PkgBuffer &buffer, size_t size) in Calculate() 74 int32_t Update(const PkgBuffer &buffer, size_t size) override; 76 int32_t Final(PkgBuffer &result) override; 78 int32_t Calculate(PkgBuffer &result, const PkgBuffer &buffer, size_t size) override; 92 int32_t Update(const PkgBuffer &buffer, size_t size) override; 94 int32_t Final(PkgBuffer &result) override; 96 int32_t Calculate(PkgBuffer &result, const PkgBuffer &buffer, size_t size) override; 110 int32_t Update(const PkgBuffer &buffer, size_t size) override; [all …]
|
D | pkg_algo_digest.cpp | 51 int32_t Crc32Algorithm::Update(const PkgBuffer &buffer, size_t size) in Update() 61 int32_t Crc32Algorithm::Final(PkgBuffer &result) in Final() 75 int32_t Crc32Algorithm::Calculate(PkgBuffer &result, const PkgBuffer &buffer, size_t size) in Calculate() 97 int32_t Sha256Algorithm::Update(const PkgBuffer &buffer, size_t size) in Update() 107 int32_t Sha256Algorithm::Final(PkgBuffer &result) in Final() 117 int32_t Sha256Algorithm::Calculate(PkgBuffer &result, const PkgBuffer &buffer, size_t size) in Calculate() 139 int32_t Sha384Algorithm::Update(const PkgBuffer &buffer, size_t size) in Update() 149 int32_t Sha384Algorithm::Final(PkgBuffer &result) in Final() 159 int32_t Sha384Algorithm::Calculate(PkgBuffer &result, const PkgBuffer &buffer, size_t size) in Calculate()
|
D | pkg_algo_deflate.h | 47 int32_t ReadUnpackData(const PkgStreamPtr inStream, PkgBuffer &inBuffer, 56 int32_t InitStream(z_stream &zstream, bool zip, PkgBuffer &inBuffer, PkgBuffer &outBuffer); 61 z_stream &zstream, int32_t flush, PkgBuffer &outBuffer, size_t &destOffset) const;
|
D | pkg_algo_sign.h | 51 …virtual int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) c… 67 …int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) const ove… in SignBuffer() 82 …int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) const ove… 91 …int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) const ove…
|
D | pkg_algo_deflate.cpp | 28 PkgBuffer &outBuffer, size_t &destOffset) const in DeflateData() 59 PkgBuffer inBuffer = {}; in PackCalculate() 60 PkgBuffer outBuffer = {}; in PackCalculate() 71 PkgBuffer crcResult((uint8_t *)&crc, sizeof(crc)); in PackCalculate() 122 int32_t PkgAlgoDeflate::ReadUnpackData(const PkgStreamPtr inStream, PkgBuffer &inBuffer, in ReadUnpackData() 156 PkgBuffer inBuffer = {}; in UnpackCalculate() 157 PkgBuffer outBuffer = {}; in UnpackCalculate() 166 PkgBuffer crcResult((uint8_t *)&crc, sizeof(crc)); in UnpackCalculate() 213 int32_t PkgAlgoDeflate::InitStream(z_stream &zstream, bool zip, PkgBuffer &inBuffer, PkgBuffer &out… in InitStream()
|
D | pkg_algo_lz4.h | 28 PkgBuffer inBuffer {}; 29 PkgBuffer outBuffer {}; 94 PkgAlgorithmContext &context, PkgBuffer &inBuffer, PkgBuffer &outBuffer);
|
D | pkg_algo_lz4.cpp | 61 PkgAlgorithmContext &context, PkgBuffer &inBuffer, PkgBuffer &outBuffer) in PackCalculate() 120 PkgBuffer inBuffer = {blockSize}; in Pack() 121 PkgBuffer outBuffer = {LZ4_compressBound(blockSize)}; in Pack() 137 PkgBuffer inBuffer(static_cast<size_t>(inBuffSize)); in UnpackCalculate() 138 PkgBuffer outBuffer(LZ4B_BLOCK_SIZE); in UnpackCalculate() 313 PkgBuffer inBuffer(inLength); in Pack() 314 PkgBuffer outBuffer(outLength); in Pack() 348 PkgBuffer pkgHeader(LZ4S_HEADER_LEN); in GetUnpackParam() 367 PkgBuffer inbuffer(nullptr, nextToRead); in GetUnpackParam() 476 PkgBuffer inBuffer(nullptr, inLength); in Unpack() [all …]
|
D | pkg_algorithm.cpp | 25 int32_t PkgAlgorithm::ReadData(const PkgStreamPtr inStream, size_t offset, PkgBuffer &buffer, in ReadData() 46 PkgBuffer digest(DIGEST_MAX_LEN); in FinalDigest() 69 PkgBuffer buffer(MAX_BUFFER_SIZE); in Pack() 115 PkgBuffer buffer(nullptr, MAX_BUFFER_SIZE); in Unpack() 161 PkgBuffer buffer(nullptr, MAX_BUFFER_SIZE); in UnpackWithVerify()
|
D | pkg_algorithm.h | 66 using VerifyFunction = std::function<int32_t(PkgBuffer &buffer, size_t len, size_t offset)>; 88 size_t offset, PkgBuffer &buffer, size_t &remainSize, size_t &readLen) const;
|
/base/update/updater/services/package/pkg_manager/ |
D | pkg_stream.h | 33 int32_t Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override in Read() 42 int32_t GetBuffer(PkgBuffer &buffer) const override in GetBuffer() 49 int32_t Write(const PkgBuffer &data, size_t size, size_t start) override in Write() 96 int32_t Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override; 98 int32_t Write(const PkgBuffer &data, size_t size, size_t start) override; 119 …apStream(PkgManager::PkgManagerPtr pkgManager, const std::string fileName, const PkgBuffer &buffer, 124 int32_t Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override; 126 int32_t Write(const PkgBuffer &data, size_t size, size_t start) override; 152 int32_t GetBuffer(PkgBuffer &buffer) const override in GetBuffer() 174 int32_t Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) override in Read() [all …]
|
D | pkg_manager_impl.h | 47 const PkgBuffer &digest, VerifyCallback cb) override; 60 …int32_t DecompressBuffer(FileInfoPtr info, const PkgBuffer &buffer, StreamPtr stream) const overri… 62 …int32_t CompressBuffer(FileInfoPtr info, const PkgBuffer &buffer, StreamPtr stream) const override; 71 …int32_t CreatePkgStream(StreamPtr &stream, const std::string &fileName, const PkgBuffer &buffer) o… 81 const std::string &version, const PkgBuffer &digest) override; 120 …2_t DoGenerateFileDigest(PkgStreamPtr stream, uint8_t flags, const size_t fileLen, PkgBuffer &buff,
|
D | pkg_stream.cpp | 75 int32_t FileStream::Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) in Read() 112 int32_t FileStream::Write(const PkgBuffer &data, size_t size, size_t start) in Write() 209 int32_t MemoryMapStream::Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) in Read() 236 int32_t MemoryMapStream::Write(const PkgBuffer &data, size_t size, size_t start) in Write() 295 int32_t FlowDataStream::Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) in Read() 356 int32_t FlowDataStream::Write(const PkgBuffer &data, size_t size, size_t start) in Write()
|
/base/update/updater/services/include/package/ |
D | pkg_info_utils.h | 140 struct PkgBuffer { struct 146 PkgBuffer() in PkgBuffer() function 152 PkgBuffer(uint8_t *buffer, size_t bufferSize) in PkgBuffer() argument 158 PkgBuffer(std::vector<uint8_t> &buffer) in PkgBuffer() argument 164 PkgBuffer(size_t bufferSize) in PkgBuffer() function
|
D | pkg_manager.h | 63 virtual int32_t Read(PkgBuffer &data, size_t start, size_t needRead, size_t &readLen) = 0; 73 virtual int32_t Write(const PkgBuffer &data, size_t size, size_t start) = 0; 77 virtual int32_t GetBuffer(PkgBuffer &buffer) const = 0; 87 using ExtractFileProcessor = std::function<int(const PkgBuffer &data, size_t size, size_t start, 92 PkgBuffer data = {}; in GetBuffer() 160 virtual int32_t DecodeHeader(PkgBuffer &buffer, size_t headerOffset, size_t dataOffset, 248 const std::string &version, const PkgBuffer &digest, VerifyCallback cb) = 0; 264 const std::string &version, const PkgBuffer &digest) = 0; 323 …virtual int32_t CreatePkgStream(StreamPtr &stream, const std::string &fileName, const PkgBuffer &b… 342 …virtual int32_t DecompressBuffer(FileInfoPtr info, const PkgBuffer &buffer, StreamPtr output) cons… [all …]
|
/base/update/updater/services/flow_update/update_bin/ |
D | bin_process.h | 42 int32_t UnCompressDataProducer(const Hpackage::PkgBuffer &buffer, size_t size, size_t start, 45 bool ReadFromBinFile(Hpackage::PkgBuffer &buffer, size_t start, size_t &readLen); 48 Hpackage::PkgBuffer stashBuffer_ {};
|
/base/update/updater/test/unittest/package/ |
D | pkg_algo_unittest.cpp | 47 PkgBuffer crcBuffer(buff, sizeof(buff)); in TestCrcDigest() 51 PkgBuffer crcResult(reinterpret_cast<uint8_t *>(&crc), sizeof(crc)); in TestCrcDigest() 70 PkgBuffer buffer(buff, sizeof(buff)); in TestHash256Digest() 74 PkgBuffer dig(bufferSize); in TestHash256Digest() 89 PkgBuffer buffer384(buff, sizeof(buff)); in TestHash384Digest() 93 PkgBuffer dig(bufferSize); in TestHash384Digest() 115 PkgBuffer buffer(dig2, sizeof(dig2)); in TestInvalidParam()
|
/base/update/updater/services/package/pkg_package/ |
D | pkg_zipfile.h | 146 int32_t DecodeHeader(PkgBuffer &buffer, size_t headerOffset, size_t dataOffset, 151 int32_t DoDecodeCentralDirEntry(PkgBuffer &buffer, size_t &decodeLen, 154 int32_t DecodeCentralDirEntry(PkgStreamPtr inStream, PkgBuffer &buffer, size_t currentPos, 162 int32_t DecodeLocalFileHeaderCheck(PkgStreamPtr inStream, PkgBuffer &data, size_t currentPos); 164 int32_t DecodeLocalFileHeader(PkgStreamPtr inStream, PkgBuffer &data, size_t currentPos, 195 int32_t LoadPackage(std::vector<std::string> &fileNames, PkgBuffer &buffer,
|
D | pkg_gzipfile.h | 52 int32_t DecodeHeader(PkgBuffer &buffer, size_t, size_t, size_t &decodeLen) override; 55 void DecodeHeaderCalOffset(uint8_t flags, const PkgBuffer &buffer, size_t &offset, 58 void GetUpGradeCompInfo(size_t &offset, PkgBuffer &buffer);
|
D | pkg_upgradefile.h | 74 int32_t DecodeHeader(PkgBuffer &buffer, size_t headerOffset, size_t dataOffset, 79 int32_t Verify(PkgBuffer &buffer, size_t len, size_t offset); 146 int32_t SaveEntry(const PkgBuffer &buffer, size_t &parsedLen, UpgradeParam &info, 151 void ParsePkgHeaderToTlv(const PkgBuffer &buffer, size_t &currLen, PkgTlv &tlv);
|
D | pkg_upgradefile.cpp | 268 PkgBuffer buffer(HASH_TLV_SIZE); in ReadSignData() 284 PkgBuffer signBuf(dataLen); in ReadSignData() 309 PkgBuffer buffer(HASH_TLV_SIZE); in ReadImgHashTLV() 327 PkgBuffer dataBuf(len); in ReadImgHashTLV() 386 PkgBuffer buffer(GetUpgradeSignatureLen() + UPGRADE_RESERVE_LEN); in ReadPackageInfo() 539 PkgBuffer buffer(buffSize); in Verify() 556 PkgBuffer digest(GetDigestLen()); in Verify() 571 PkgBuffer digest(GetDigestLen()); in VerifyHeader() 582 int32_t UpgradePkgFile::SaveEntry(const PkgBuffer &buffer, size_t &parsedLen, UpgradeParam &info, in SaveEntry() 593 PkgBuffer headerBuff(buffer.buffer + info.currLen, info.readLen - info.currLen); in SaveEntry() [all …]
|
D | pkg_pkgfile.h | 82 static int32_t ConvertBufferToString(std::string &fileName, const PkgBuffer &buffer); 84 …static int32_t ConvertStringToBuffer(const std::string &fileName, const PkgBuffer &buffer, size_t …
|
D | pkg_gzipfile.cpp | 65 void GZipFileEntry::GetUpGradeCompInfo(size_t &offset, PkgBuffer &buffer) in GetUpGradeCompInfo() 111 PkgBuffer buffer(BUFFER_SIZE); in EncodeHeader() 157 PkgBuffer buffer(BLOCK_SIZE); in Pack() 175 PkgBuffer buffer(BLOCK_SIZE); // Read last 8 bytes at the end of package in CheckFileInfo() 236 void GZipFileEntry::DecodeHeaderCalOffset(uint8_t flags, const PkgBuffer &buffer, size_t &offset, in DecodeHeaderCalOffset() 258 int32_t GZipFileEntry::DecodeHeader(PkgBuffer &buffer, size_t headerOffset, size_t dataOffset, in DecodeHeader() 366 PkgBuffer buffer(nullptr, BUFFER_SIZE); in LoadPackage()
|
/base/update/updater/test/unittest/script/ |
D | script_unittest.h | 41 const std::string &version, const PkgBuffer &digest, VerifyCallback cb) override in VerifyPackage() 55 const std::string &version, const PkgBuffer &digest) override in VerifyBinFile() 81 …int32_t CreatePkgStream(StreamPtr &stream, const std::string &fileName, const PkgBuffer &buffer) o… in CreatePkgStream() 86 …int32_t DecompressBuffer(FileInfoPtr info, const PkgBuffer &buffer, StreamPtr output) const overri… in DecompressBuffer() 90 … int32_t CompressBuffer(FileInfoPtr info, const PkgBuffer &buffer, StreamPtr output) const override in CompressBuffer()
|
/base/update/updater/services/script/script_interpreter/ |
D | script_scanner.cpp | 25 PkgBuffer data(maxSize); in LexerInput()
|
/base/update/updater/services/updater_binary/ |
D | update_processor.h | 59 …static int RawImageWriteProcessor(const Hpackage::PkgBuffer &buffer, size_t size, size_t start, bo… 83 …static int UnCompressDataProducer(const Hpackage::PkgBuffer &buffer, size_t size, size_t start, bo…
|