Home
last modified time | relevance | path

Searched refs:digestMethod (Results 1 – 25 of 33) sorted by relevance

12

/ohos5.0/base/update/updater/services/package/pkg_algorithm/
H A Dpkg_algo_sign.h47 …nAlgorithm(const std::string keyPath, uint8_t digestMethod) : keyName_(keyPath), digestMethod_(dig… in SignAlgorithm() argument
63 …VerifyAlgorithm(const std::string keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMe… in VerifyAlgorithm() argument
78 …gnAlgorithmRsa(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMe… in SignAlgorithmRsa() argument
87 …gnAlgorithmEcc(const std::string &keyPath, uint8_t digestMethod) : SignAlgorithm(keyPath, digestMe… 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 …gAlgorithmContext(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 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Pack()
109 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Unpack()
155 …ithm::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 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Pack()
200 …ithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.digestMethod); in Unpack()
/ohos5.0/base/update/updater/test/fuzztest/package_fuzzer/
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
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 = PKG_DIGEST_TYPE_CRC; in TestLz4PkgCompress()
230 info.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestLz4PkgCompress()
[all …]
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() argument
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, fi… in CreateZipPackage()
/ohos5.0/base/update/updater/test/unittest/package/
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
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 = PKG_DIGEST_TYPE_CRC; in TestLz4PkgCompress()
249 pkgInfo.digestMethod = PKG_DIGEST_TYPE_SHA256; in TestLz4PkgCompress()
[all …]
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() argument
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… in CreateZipPackage()
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 = PKG_DIGEST_TYPE_NONE; in TestDecompressLz4plus()
[all …]
/ohos5.0/base/update/updater/interfaces/kits/packages/
H A Dpackage.cpp50 upgradePackageInfo->pkgInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo()
66 info->fileInfo.digestMethod = pkgInfoExt->digestMethod; in GetUpgradePkgInfo()
83 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetZipPkgInfo()
92 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in GetZipPkgInfo()
103 pkgInfo->digestMethod = pkgInfoExt->digestMethod; in GetLz4PkgInfo()
112 info->fileInfo.digestMethod = PKG_DIGEST_TYPE_CRC; in GetLz4PkgInfo()
/ohos5.0/base/update/updater/test/fuzztest/fuzz_src_data/
H A DTestDecompressGzip.new.gz1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * ...
/ohos5.0/base/update/updater/test/unittest/test_data/applypatch/
H A DTestDecompressGzip.new.gz1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * ...
/ohos5.0/base/update/updater/services/package/pkg_manager/
H A Dpkg_managerImpl.cpp422 return Verify(info->digestMethod, digest, signature); in LoadPackageWithStream()
774 size_t digestLen = DigestAlgorithm::GetDigestLen(digestMethod); in DoCreatePkgStream()
775 size_t signatureLen = DigestAlgorithm::GetSignatureLen(digestMethod); in DoCreatePkgStream()
808 if (digestMethod != PKG_DIGEST_TYPE_SHA256) { in DoCreatePkgStream()
823 signVerifyKeyName_, digestMethod); in DoCreatePkgStream()
841 size_t digestLen = DigestAlgorithm::GetDigestLen(info->digestMethod); in DoCreatePkgStream()
855 size_t signLen = DigestAlgorithm::GetSignatureLen(info->digestMethod); in DoCreatePkgStream()
916 PkgAlgorithmContext context = {{0, 0}, {buffer.length, 0}, 0, info->digestMethod}; in DoCreatePkgStream()
948 PkgAlgorithmContext context = {{0, 0}, {0, buffer.length}, 0, info->digestMethod}; in DoCreatePkgStream()
1084 size_t digestLen = DigestAlgorithm::GetDigestLen(digestMethod); in DoCreatePkgStream()
[all …]
H A Dpkg_manager_impl.h120 …int32_t Verify(uint8_t digestMethod, const std::vector<uint8_t> &digest, const std::vector<uint8_t…
126 …uint8_t digestMethod, uint8_t flags, std::vector<std::vector<uint8_t>> &digestInfos, size_t hashBu…
/ohos5.0/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_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()
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_lz4file.h61 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256;
H A Dpkg_gzipfile.h68 pkgInfo_.digestMethod = PKG_DIGEST_TYPE_SHA256;
H A Dpkg_pkgfile.h86 void AddSignData(uint8_t digestMethod, size_t currOffset, size_t &signOffset);
/ohos5.0/base/update/updater/services/include/package/
H A Dpkg_info_utils.h71 uint8_t digestMethod; member
82 uint8_t digestMethod = 0; member
/ohos5.0/base/update/updater/interfaces/kits/include/package/
H A Dpackage.h76 uint8_t digestMethod = PKG_DIGEST_TYPE_SHA256; member

12