Home
last modified time | relevance | path

Searched refs:tmpBuf (Results 1 – 11 of 11) sorted by relevance

/base/security/huks/test/unittest/huks_lite_test/liteos_m_adapter/
Dhks_safe_cipher_key_test.c77 uint8_t *tmpBuf = storageBuf.data + offset; in GetKeyOffsetByKeyAlias() local
78 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; in GetKeyOffsetByKeyAlias()
80 if (HksMemCmp(keyAlias->data, tmpBuf + sizeof(*keyInfo), keyAlias->size) == 0) { in GetKeyOffsetByKeyAlias()
Dhks_safe_compare_key_test.c138 uint8_t *tmpBuf = storageBuf.data + offset; in GetKeyOffsetByKeyAlias() local
139 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; in GetKeyOffsetByKeyAlias()
141 if (HksMemCmp(keyAlias->data, tmpBuf + sizeof(*keyInfo), keyAlias->size) == 0) { in GetKeyOffsetByKeyAlias()
/base/security/huks/services/huks_standard/huks_service/main/core/src/
Dhks_storage_lite.c362 uint8_t *tmpBuf = storageBuf.data + offset; in GetKeyOffsetByKeyAlias() local
363 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; in GetKeyOffsetByKeyAlias()
370 if (HksMemCmp(keyAlias->data, tmpBuf + sizeof(*keyInfo), keyAlias->size) == 0) { in GetKeyOffsetByKeyAlias()
685 uint8_t *tmpBuf = g_storageImageBuffer.data + offset; in HksStoreGetKeyBlob()
686 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; in HksStoreGetKeyBlob()
693 if (memcpy_s(keyBlob->data, keyBlob->size, tmpBuf, keyInfo->keyInfoLen) != EOK) { in HksStoreGetKeyBlob()
822 uint8_t *tmpBuf = storageBuf.data + offset; /* storageBuf.size has been checked */ in HksStoreGetKeyInfoList() local
823 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; in HksStoreGetKeyInfoList()
830 struct HksBlob keyInfoBlob = { keyInfo->keyInfoLen, tmpBuf }; in HksStoreGetKeyInfoList()
/base/security/huks/utils/crypto_adapter/
Dhks_client_service_adapter_lite.c47 uint8_t *tmpBuf = (uint8_t *)HksMalloc(MAX_KEY_SIZE); in PkCtxToX509() local
48 HKS_IF_NULL_RETURN(tmpBuf, HKS_ERROR_MALLOC_FAIL) in PkCtxToX509()
52 int32_t x509Size = mbedtls_pk_write_pubkey_der(ctx, tmpBuf, MAX_KEY_SIZE); in PkCtxToX509()
67 if (memcpy_s(x509KeyData, x509Size, tmpBuf + MAX_KEY_SIZE - x509Size, x509Size) != EOK) { in PkCtxToX509()
78 HKS_FREE_PTR(tmpBuf); in PkCtxToX509()
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/
Ddlp_file.cpp375 uint8_t *tmpBuf = new (std::nothrow)uint8_t[head_.contactAccountSize]; in ParseDlpHeader() local
376 if (tmpBuf == nullptr) { in ParseDlpHeader()
381 if (read(dlpFd_, tmpBuf, head_.contactAccountSize) != (ssize_t)head_.contactAccountSize) { in ParseDlpHeader()
382 delete[] tmpBuf; in ParseDlpHeader()
387 contactAccount_ = std::string(tmpBuf, tmpBuf + head_.contactAccountSize); in ParseDlpHeader()
388 delete[] tmpBuf; in ParseDlpHeader()
391 tmpBuf = new (std::nothrow)uint8_t[head_.offlineCertSize]; in ParseDlpHeader()
392 if (tmpBuf == nullptr) { in ParseDlpHeader()
397 if (read(dlpFd_, tmpBuf, head_.offlineCertSize) != (ssize_t)head_.offlineCertSize) { in ParseDlpHeader()
398 delete[] tmpBuf; in ParseDlpHeader()
[all …]
/base/global/resource_management/frameworks/resmgr/src/
Dhap_resource.cpp176 bool GetIndexData(const char *path, std::unique_ptr<uint8_t[]> &tmpBuf, size_t &len) in GetIndexData() argument
190 bool ret = extractor->ExtractToBufByName(indexFilePath, tmpBuf, len); in GetIndexData()
202 std::unique_ptr<uint8_t[]> tmpBuf; in LoadFromHap() local
204 bool ret = GetIndexData(path, tmpBuf, tmpLen); in LoadFromHap()
214 …int32_t out = HapParser::ParseResHex(reinterpret_cast<char *>(tmpBuf.get()), tmpLen, *resDesc, def… in LoadFromHap()
Draw_file_manager.cpp177 std::unique_ptr<uint8_t[]> tmpBuf; in LoadRawFileFromHap() local
178 RState state = mgr->resManager->GetRawFileFromHap(fileName, len, tmpBuf); in LoadRawFileFromHap()
189 int ret = memcpy_s(result->buffer, len, tmpBuf.get(), len); in LoadRawFileFromHap()
/base/global/resource_management_lite/frameworks/resmgr_lite/src/utils/
Dhap_parser.cpp129 void *tmpBuf = nullptr; in ReadIndexFromFile() local
132 int32_t ret = ReadFileFromZip(zipFile, "config.json", &tmpBuf, tmpLen, tmp); in ReadIndexFromFile()
140 std::string mName = GetModuleName(static_cast<char *>(tmpBuf)); in ReadIndexFromFile()
143 free(tmpBuf); in ReadIndexFromFile()
146 free(tmpBuf); in ReadIndexFromFile()
/base/global/resource_management/frameworks/resmgr/src/utils/
Dhap_parser.cpp137 std::unique_ptr<uint8_t[]> tmpBuf; in ParseModuleNameFromHap() local
140 ret = HapParser::ReadFileFromZip(uf, "config.json", tmpBuf, tmpLen); in ParseModuleNameFromHap()
146 std::string mName = GetModuleName(reinterpret_cast<char *>(tmpBuf.get()), tmpLen); in ParseModuleNameFromHap()
/base/hiviewdfx/hilog_lite/frameworks/featured/
Dhiview_log.c1333 char tmpBuf[SECUREC_MB_LEN + 1]; in HiLogSecOutputS() local
1335 int retVal = wctomb(tmpBuf, *p++); in HiLogSecOutputS()
1341 SECUREC_WRITE_STRING(tmpBuf, retVal, stream, &charsOut); in HiLogSecOutputS()
/base/hiviewdfx/hilog/frameworks/libhilog/vsnprintf/
Doutput_p.inl1222 char tmpBuf[SECUREC_MB_LEN + 1]; local
1224 int retVal = wctomb(tmpBuf, *p++);
1230 SECUREC_WRITE_STRING(tmpBuf, retVal, stream, &charsOut);