Home
last modified time | relevance | path

Searched refs:digestMethod (Results 1 - 25 of 31) sorted by relevance

12

/base/update/updater/services/package/pkg_algorithm/
H A Dpkg_algo_sign.h47 SignAlgorithm(const std::string keyPath, uint8_t digestMethod) : keyName_(keyPath), digestMethod_(digestMethod) {} in SignAlgorithm() argument
63 VerifyAlgorithm(const std::string keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMethod) {} in VerifyAlgorithm() argument
78 SignAlgorithmRsa(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMethod) {} in SignAlgorithmRsa() argument
87 SignAlgorithmEcc(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMethod) {} in SignAlgorithmEcc() argument
H A Dpkg_algo_digest.cpp22 size_t DigestAlgorithm::GetDigestLen(int8_t digestMethod) in GetDigestLen() argument
25 if (digestMethod < PKG_DIGEST_TYPE_MAX) { in GetDigestLen()
26 return digestLens[digestMethod]; in GetDigestLen()
31 size_t DigestAlgorithm::GetSignatureLen(int8_t digestMethod) in GetSignatureLen() argument
34 if (digestMethod < PKG_DIGEST_TYPE_MAX) { in GetSignatureLen()
35 return signatureLens[digestMethod]; in GetSignatureLen()
H A Dpkg_algorithm.h49 uint8_t digestMethod = 0; member
52 PkgAlgorithmContext(PkgContextOffset offset, PkgContextSize size, uint32_t crc, uint8_t digestMethod) in PkgAlgorithmContext()
59 this->digestMethod = digestMethod; in PkgAlgorithmContext()
H A Dpkg_algorithm.cpp45 if (context.digestMethod == PKG_DIGEST_TYPE_SHA256) { in FinalDigest()
62 DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Pack()
109 DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Unpack()
155 DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in UnpackWithVerify()
H A Dpkg_algo_digest.h61 static size_t GetDigestLen(int8_t digestMethod);
62 static size_t GetSignatureLen(int8_t digestMethod);
H A Dpkg_algo_deflate.cpp114 DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Pack()
200 DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Unpack()
/base/update/updater/test/fuzztest/package_fuzzer/
H A Dpkg_fuzz_test.h168 PKG_LOGI("FileInfo [%zu] digestMethod: %d \n", num, info->digestMethod); in ExtractFile()
174 const std::string pkgName, const std::string &base, int digestMethod) in CreateZipPackage()
183 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in CreateZipPackage()
190 pkgInfo.digestMethod = digestMethod; in CreateZipPackage()
192 int32_t ret = pkgManager->CreatePackage(pkgName, GetFuzzPrivateKeyName(digestMethod), &pkgInfo, files); in CreateZipPackage()
173 CreateZipPackage(const std::vector<std::string> &testNames, const std::string pkgName, const std::string &base, int digestMethod) CreateZipPackage() argument
H A Dpackage_fuzzer.cpp91 pkgInfo.digestMethod = type; in TestPackagePack()
116 GetFuzzPrivateKeyName(pkgInfo.digestMethod).c_str()); in TestPackagePack()
129 int TestZipPkgCompress(int digestMethod) in TestZipPkgCompress() argument
131 return CreateZipPackage(testFileNames_, TEST_PATH_TO + testZipPackageName, TEST_PATH_FROM, digestMethod); in TestZipPkgCompress()
148 int TestZipPkgDecompress(int digestMethod) in TestZipPkgDecompress() argument
152 GetFuzzCertName(digestMethod), componentsList); in TestZipPkgDecompress()
168 zipFile.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestGZipPkgCompress()
174 info.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestGZipPkgCompress()
177 GetFuzzPrivateKeyName(info.digestMethod), &info, files); in TestGZipPkgCompress()
219 zipFile.fileInfo.digestMethod in TestLz4PkgCompress()
[all...]
/base/update/updater/test/unittest/package/
H A Dpkg_test.h148 PKG_LOGI("FileInfo [%zu] digestMethod: %d \n", i, info->digestMethod); in ExtractFile()
154 const std::string packageName, const std::string &base, int digestMethod) in CreateZipPackage()
164 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in CreateZipPackage()
171 pkgInfo.digestMethod = digestMethod; in CreateZipPackage()
173 int32_t ret = pkgManager->CreatePackage(packageName, GetTestPrivateKeyName(digestMethod), &pkgInfo, files); in CreateZipPackage()
153 CreateZipPackage(const std::vector<std::string> &testFileNames, const std::string packageName, const std::string &base, int digestMethod) CreateZipPackage() argument
H A Dpackage_unittest.cpp94 pkgInfo.digestMethod = type; in TestPackagePack()
121 GetTestPrivateKeyName(pkgInfo.digestMethod).c_str()); in TestPackagePack()
151 int TestZipPkgCompress(int digestMethod) in TestZipPkgCompress() argument
153 return CreateZipPackage(testFileNames_, TEST_PATH_TO + testZipPackageName, TEST_PATH_FROM, digestMethod); in TestZipPkgCompress()
156 int TestZipPkgDecompress(int digestMethod) in TestZipPkgDecompress() argument
161 GetTestCertName(digestMethod), components); in TestZipPkgDecompress()
180 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestGZipPkgCompress()
186 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestGZipPkgCompress()
189 GetTestPrivateKeyName(pkgInfo.digestMethod), &pkgInfo, files); in TestGZipPkgCompress()
238 file.fileInfo.digestMethod in TestLz4PkgCompress()
[all...]
H A Dpkg_manager_unittest.cpp104 pkgInfo.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in GetUpgradePkgInfo()
123 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in GetUpgradePkgInfo()
252 info.fileInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestCreatePackageInvalidFile()
289 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PackageInvalidFile()
293 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestLz4PackageInvalidFile()
314 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestLz4PackageInvalidPkgType()
318 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestLz4PackageInvalidPkgType()
337 file.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in TestZipPackageInvalidFile()
342 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestZipPackageInvalidFile()
372 lz4Info.fileInfo.digestMethod in TestDecompressLz4plus()
[all...]
/base/update/updater/services/package/pkg_package/
H A Dpkg_pkgfile.cpp147 localFileInfo->digestMethod = fileInfo->digestMethod; in Init()
170 void PkgFileImpl::AddSignData(uint8_t digestMethod, size_t currOffset, size_t &signOffset) in AddSignData() argument
173 if (digestMethod == PKG_DIGEST_TYPE_NONE) { in AddSignData()
H A Dpkg_lz4file.cpp63 0, fileInfo_.fileInfo.digestMethod in Pack()
93 0, fileInfo_.fileInfo.digestMethod in Unpack()
115 fileInfo_.fileInfo.digestMethod = PKG_DIGEST_TYPE_NONE; in DecodeHeader()
172 AddSignData(pkgInfo_.digestMethod, currentOffset_, offset); in SavePackage()
H A Dpkg_gzipfile.h68 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256; in GZipPkgFile()
H A Dpkg_lz4file.h61 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256; in Lz4PkgFile()
H A Dpkg_upgradefile.cpp88 return DigestAlgorithm::GetDigestLen(pkgInfo_.pkgInfo.digestMethod); in GetDigestLen()
403 if (pkgInfo_.pkgInfo.digestMethod == PKG_DIGEST_TYPE_SHA384) { in ReadPackageInfo()
682 pkgInfo_.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in ParsePkgHeaderToTlv()
687 pkgInfo_.pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA384; in ParsePkgHeaderToTlv()
732 algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(pkgInfo_.pkgInfo.digestMethod); in ReadUpgradePkgHeader()
844 0, fileInfo_.fileInfo.digestMethod in Pack()
897 fileInfo_.fileInfo.digestMethod = PKG_DIGEST_TYPE_NONE; in DecodeHeader()
937 0, fileInfo_.fileInfo.digestMethod in Unpack()
1006 if (pkgInfo_.pkgInfo.digestMethod < PKG_DIGEST_TYPE_MAX) { in GetPackageTlvType()
1007 return packageTlvType[pkgInfo_.pkgInfo.digestMethod]; in GetPackageTlvType()
[all...]
H A Dpkg_gzipfile.cpp142 0, fileInfo_.fileInfo.digestMethod in Pack()
215 0, fileInfo_.fileInfo.digestMethod in Unpack()
280 fileInfo_.fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in DecodeHeader()
351 AddSignData(pkgInfo_.digestMethod, currentOffset_, offset); in SavePackage()
H A Dpkg_pkgfile.h86 void AddSignData(uint8_t digestMethod, size_t currOffset, size_t &signOffset);
H A Dpkg_zipfile.h186 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256; in ZipPkgFile()
/base/update/updater/interfaces/kits/packages/
H A Dpackage.cpp56 upgradePackageInfo->pkgInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo()
72 info->fileInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo()
94 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetZipPkgInfo()
103 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in GetZipPkgInfo()
119 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetLz4PkgInfo()
128 info->fileInfo.digestMethod in GetLz4PkgInfo()
[all...]
/base/update/updater/services/package/pkg_manager/
H A Dpkg_managerImpl.cpp422 return Verify(info->digestMethod, digest, signature); in LoadPackageWithStream()
771 uint8_t digestMethod, uint8_t flags, std::vector<std::vector<uint8_t>> &digestInfos, size_t hashBufferLen) in DoCreatePkgStream()
774 size_t digestLen = DigestAlgorithm::GetDigestLen(digestMethod); in DoCreatePkgStream()
775 size_t signatureLen = DigestAlgorithm::GetSignatureLen(digestMethod); in DoCreatePkgStream()
777 DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(digestMethod); in DoCreatePkgStream()
784 DigestAlgorithm::DigestAlgorithmPtr algorithmInner = PkgAlgorithmFactory::GetDigestAlgorithm(digestMethod); in DoCreatePkgStream()
808 if (digestMethod != PKG_DIGEST_TYPE_SHA256) { in DoCreatePkgStream()
819 int32_t PkgManagerImpl::Verify(uint8_t digestMethod, const std::vector<uint8_t> &digest, in DoCreatePkgStream() argument
823 signVerifyKeyName_, digestMethod); in DoCreatePkgStream()
841 size_t digestLen = DigestAlgorithm::GetDigestLen(info->digestMethod); in DoCreatePkgStream()
770 GenerateFileDigest(PkgStreamPtr stream, uint8_t digestMethod, uint8_t flags, std::vector<std::vector<uint8_t>> &digestInfos, size_t hashBufferLen) DoCreatePkgStream() argument
1083 int8_t digestMethod = static_cast<int8_t>(DigestAlgorithm::GetDigestMethod(version)); DoCreatePkgStream() local
[all...]
H A Dpkg_manager_impl.h120 int32_t Verify(uint8_t digestMethod, const std::vector<uint8_t> &digest, const std::vector<uint8_t> &signature);
126 uint8_t digestMethod, uint8_t flags, std::vector<std::vector<uint8_t>> &digestInfos, size_t hashBufferLen = 0);
/base/update/updater/services/include/package/
H A Dpkg_info_utils.h71 uint8_t digestMethod; member
82 uint8_t digestMethod = 0; member
/base/update/updater/interfaces/kits/include/package/
H A Dpackage.h76 uint8_t digestMethod = PKG_DIGEST_TYPE_SHA256; member
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
H A DUpdaterStartUpdaterProc_fuzzer.cpp119 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in CreatePackageZip()

Completed in 14 milliseconds

12