Home
last modified time | relevance | path

Searched refs:PkgBuffer (Results 1 – 25 of 64) sorted by relevance

123

/base/update/updater/services/package/pkg_algorithm/
Dpkg_algo_digest.h42 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 …]
Dpkg_algo_digest.cpp51 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()
Dpkg_algo_deflate.h47 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;
Dpkg_algo_sign.h51 …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…
Dpkg_algo_deflate.cpp28 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()
Dpkg_algo_lz4.h28 PkgBuffer inBuffer {};
29 PkgBuffer outBuffer {};
94 PkgAlgorithmContext &context, PkgBuffer &inBuffer, PkgBuffer &outBuffer);
Dpkg_algo_lz4.cpp61 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 …]
Dpkg_algorithm.cpp25 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()
Dpkg_algorithm.h66 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/
Dpkg_stream.h33 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 …]
Dpkg_manager_impl.h47 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,
Dpkg_stream.cpp75 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/
Dpkg_info_utils.h140 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
Dpkg_manager.h63 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/
Dbin_process.h42 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/
Dpkg_algo_unittest.cpp47 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/
Dpkg_zipfile.h146 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,
Dpkg_gzipfile.h52 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);
Dpkg_upgradefile.h74 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);
Dpkg_upgradefile.cpp268 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 …]
Dpkg_pkgfile.h82 static int32_t ConvertBufferToString(std::string &fileName, const PkgBuffer &buffer);
84 …static int32_t ConvertStringToBuffer(const std::string &fileName, const PkgBuffer &buffer, size_t …
Dpkg_gzipfile.cpp65 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/
Dscript_unittest.h41 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/
Dscript_scanner.cpp25 PkgBuffer data(maxSize); in LexerInput()
/base/update/updater/services/updater_binary/
Dupdate_processor.h59 …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…

123