Home
last modified time | relevance | path

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

/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_crypto_ed25519.c57 uint32_t totalSize = sizeof(struct KeyMaterial25519) + pubKey->size + priKey->size; in SaveEd25519KeyMaterial() local
58 uint8_t *buffer = (uint8_t *)HksMalloc(totalSize); in SaveEd25519KeyMaterial()
69 if (memcpy_s(buffer + offset, totalSize - offset, pubKey->data, pubKey->size) != EOK) { in SaveEd25519KeyMaterial()
71 (void)memset_s(buffer, totalSize, 0, totalSize); in SaveEd25519KeyMaterial()
77 if (memcpy_s(buffer + offset, totalSize - offset, priKey->data, priKey->size) != EOK) { in SaveEd25519KeyMaterial()
79 (void)memset_s(buffer, totalSize, 0, totalSize); in SaveEd25519KeyMaterial()
85 keyOut->size = totalSize; in SaveEd25519KeyMaterial()
124 uint32_t totalSize = sizeof(struct KeyMaterial25519); in CheckEd25519Material() local
125 if (key->size < totalSize) { in CheckEd25519Material()
131 if (((key->size - totalSize) < km->pubKeySize) || in CheckEd25519Material()
[all …]
/base/security/huks/utils/crypto_adapter/
Dhks_client_service_adapter_common.c59 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + key->size; in TranslateToInnerCurve25519Format() local
60 uint8_t *buffer = (uint8_t *)HksMalloc(totalSize); in TranslateToInnerCurve25519Format()
61 …KS_IF_NULL_LOGE_RETURN(buffer, HKS_ERROR_MALLOC_FAIL, "malloc failed! %" LOG_PUBLIC "u", totalSize) in TranslateToInnerCurve25519Format()
62 (void)memset_s(buffer, totalSize, 0, totalSize); in TranslateToInnerCurve25519Format()
70 (void)memcpy_s(buffer + offset, totalSize - offset, key->data, key->size); in TranslateToInnerCurve25519Format()
72 publicKey->size = totalSize; in TranslateToInnerCurve25519Format()
Dhks_client_service_adapter_lite.c311 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + nSize + eSize; in X509PublicKeyToRsa() local
312 uint8_t *keyBuffer = (uint8_t *)HksMalloc(totalSize); in X509PublicKeyToRsa()
339 rsaPublicKey->size = totalSize; in X509PublicKeyToRsa()
366 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + xSize + ySize; in X509PublicKeyToEcc()
367 uint8_t *keyBuffer = (uint8_t *)HksMalloc(totalSize); in X509PublicKeyToEcc()
401 eccPublicKey->size = totalSize; in X509PublicKeyToEcc()
Dhks_client_service_adapter.c592 uint32_t totalSize = (uint32_t)nSize + (uint32_t)eSize + sizeof(struct HksPubKeyInfo); in X509PublicKeyToRsa() local
593 uint8_t *keyBuffer = (uint8_t *)HksMalloc(totalSize); in X509PublicKeyToRsa()
610 rsaPublicKey->size = totalSize; in X509PublicKeyToRsa()
644 uint32_t totalSize = xSize + ySize + sizeof(struct HksPubKeyInfo); in EcKeyToPublicKey() local
645 uint8_t *keyBuffer = (uint8_t *)HksMalloc(totalSize); in EcKeyToPublicKey()
663 eccPublicKey->size = totalSize; in EcKeyToPublicKey()
786 uint32_t totalSize = sizeof(struct KeyMaterialDsa) + ySize + pSize + qSize + gSize; in X509PublicKeyToDsa() local
787 uint8_t *keyBuffer = (uint8_t *)HksMalloc(totalSize); in X509PublicKeyToDsa()
813 dsaPublicKey->size = totalSize; in X509PublicKeyToDsa()
837 uint32_t totalSize = sizeof(struct KeyMaterialDh) + pubKeySize; in X509PublicKeyToDh() local
[all …]
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_app_cert_process.c188 uint32_t totalSize = sizeof(struct HksKeyMaterial25519) + (CURVE25519_KEY_LEN_BYTES << 1); in SaveKeyMaterialCurve25519() local
189 uint8_t *buffer = (uint8_t *)CMMalloc(totalSize); in SaveKeyMaterialCurve25519()
191 CM_LOG_E("malloc size %u failed", totalSize); in SaveKeyMaterialCurve25519()
194 (void)memset_s(buffer, totalSize, 0, totalSize); in SaveKeyMaterialCurve25519()
202 (void)memset_s(buffer, totalSize, 0, totalSize); in SaveKeyMaterialCurve25519()
211 (void)memset_s(buffer, totalSize, 0, totalSize); in SaveKeyMaterialCurve25519()
224 keyOut->size = totalSize; in SaveKeyMaterialCurve25519()
/base/update/update_app/feature/ota/src/main/ets/util/
DVersionUtils.ets40 let totalSize: number = 0;
42 totalSize += Number(newVersion?.versionComponents?.[index]?.size);
44 LogUtils.info(TAG, 'calculatePackageSize, totalSize: ' + totalSize);
45 return totalSize;
/base/security/huks/services/huks_standard/huks_engine/main/device_cert_manager/src/
Ddcm_attest_utils.c116 uint32_t totalSize = spkiHeaderLen + info->nOrXSize + info->eOrYSize; in GetEcPublicKey() local
117 if (key->size < totalSize) { in GetEcPublicKey()
118 … HKS_LOG_E("out size is too small: %" LOG_PUBLIC "u < %" LOG_PUBLIC "u\n", key->size, totalSize); in GetEcPublicKey()
121 key->size = totalSize; in GetEcPublicKey()
127 (void)memcpy_s(p, totalSize - spkiHeaderLen, publicKey, info->nOrXSize); in GetEcPublicKey()
129 …(void)memcpy_s(p, totalSize - spkiHeaderLen - info->nOrXSize, publicKey + info->nOrXSize, info->eO… in GetEcPublicKey()
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/
Dfile_util.cpp131 uint64_t totalSize = 0; in GetDirSize() local
135 totalSize += static_cast<uint64_t>(statBuf.st_size); in GetDirSize()
138 return totalSize; in GetDirSize()
/base/update/updater/services/applypatch/
Dtransfer_manager.cpp85 size_t totalSize = globalParams->blockCount; in CommandsParser() local
116 … if (totalSize != 0 && globalParams->env != nullptr && NeedSetProgress(cmd->GetCommandType())) { in CommandsParser()
118 … std::to_string((static_cast<double>(globalParams->written) - initBlock) / totalSize)); in CommandsParser()
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/cache/
Dapp_event_block_dao.cpp123 int totalSize = 0; in GetPackagesBySize() local
133 totalSize += packageSize; in GetPackagesBySize()
136 return totalSize; in GetPackagesBySize()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_curve25519.c33 uint32_t totalSize = sizeof(struct KeyMaterial25519) + (CURVE25519_KEY_LEN << 1); in SaveCurve25519KeyMaterial() local
34 uint8_t *buffer = (uint8_t *)HksMalloc(totalSize); in SaveCurve25519KeyMaterial()
35 …F_NULL_LOGE_RETURN(buffer, HKS_ERROR_MALLOC_FAIL, "malloc size %" LOG_PUBLIC "u failed", totalSize) in SaveCurve25519KeyMaterial()
63 keyOut->size = totalSize; in SaveCurve25519KeyMaterial()
Dhks_openssl_ed25519tox25519.c372 …uint32_t totalSize = sizeof(struct KeyMaterial25519) + CURVE25519_KEY_LEN * 2; // 2: private key a… in ConvertPrivX25519FromED25519() local
373 if (keyIn->size < totalSize || keyOut->size < tmpSize) { in ConvertPrivX25519FromED25519()
/base/update/sys_installer_lite/frameworks/source/updater/
Dhota_updater.c50 unsigned int totalSize; /* total size of this component */ member
304 g_currentDloadComp.totalSize = g_componentInfos.table[g_currentDloadComp.index - 1].length; in InitDloadNextComp()
305 g_currentDloadComp.remainSize = g_currentDloadComp.totalSize; in InitDloadNextComp()
380 g_currentDloadComp.totalSize = g_infoCompAndSignSize; in ProcessInfoCompHeader()
545 … (g_currentDloadComp.offset + g_currentDloadComp.totalSize) < (tempOffset + tempBuffSize) ? in HotaDefaultWrite()
546 (g_currentDloadComp.offset + g_currentDloadComp.totalSize) : in HotaDefaultWrite()
/base/update/updater/utils/
Dutils.cpp130 int64_t totalSize = 0; in GetFilesFromDirectory() local
140 totalSize += GetFilesFromDirectory(fileName, files, isRecursive); in GetFilesFromDirectory()
143 totalSize += st.st_size; in GetFilesFromDirectory()
147 return totalSize; in GetFilesFromDirectory()
647 long long int totalSize = 0; in GetDirSize() local
661 totalSize += GetDirSize(subFolderPath); in GetDirSize()
663 totalSize += fileStat.st_size; in GetDirSize()
667 return totalSize; in GetDirSize()
/base/request/request/
DREADME.md85 | on(type: 'progress', callback:(receivedSize: number, totalSize: number) => void): void | Enables …
88 | off(type: 'progress', callback?:(receivedSize: number, totalSize: number) => void): void | Disabl…
136 | on(type: 'progress', callback:AsyncCallback <uploadedSize: number, totalSize: number> => void): v…
138 | off(type: 'progress', callback:AsyncCallback<uploadedSize: number, totalSize: number>=> void): vo…
240 downloadTask.on('progress', (receivedSize, totalSize) => {
241 console.info("download receivedSize :" + receivedSize + " totalSize :" + totalSize);
286 downloadTask.off('progress', (receivedSize, totalSize) => {
287 console.info("download receivedSize :" + receivedSize + " totalSize :" + totalSize);
514 uploadTask.on('progress', (uploadedSize, totalSize) => {
515 console.info("on progress upload uploadedSize :" + uploadedSize + " totalSize :" + totalSize);
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_ecc_helper.c476 uint32_t totalSize = xSize + ySize + sizeof(struct HksPubKeyInfo); in EcKeyToPublicKey() local
477 uint8_t *keyBuffer = HksMalloc(totalSize); in EcKeyToPublicKey()
494 eccPublicKey->size = totalSize; in EcKeyToPublicKey()
495 if (memcpy_s(eccPublicKey->data, eccPublicKey->size, keyBuffer, totalSize) != 0) { in EcKeyToPublicKey()
/base/hiviewdfx/hiview/plugins/sysevent_source/include/
Dplatform_monitor.h39 uint32_t totalSize; member
/base/security/device_auth/services/group_manager/src/group_operation/
Dgroup_operation_common.c490 uint32_t totalSize = firstSize + secondSize + separatorSize; in GetHashMessage() local
491 *hashMessage = (uint8_t *)HcMalloc(totalSize, 0); in GetHashMessage()
498 if (memcpy_s((*hashMessage), totalSize, first->val, firstSize) != HC_SUCCESS) { in GetHashMessage()
503 …if (memcpy_s((*hashMessage) + firstSize, totalSize - firstSize, separator, separatorSize) != HC_SU… in GetHashMessage()
518 *messageSize = totalSize; in GetHashMessage()
/base/security/huks/services/huks_standard/huks_service/main/core/src/
Dhks_client_service.c551 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + key->size; in TranslateToInnerCurve25519Format() local
552 uint8_t *buffer = (uint8_t *)HksMalloc(totalSize); in TranslateToInnerCurve25519Format()
553 …KS_IF_NULL_LOGE_RETURN(buffer, HKS_ERROR_MALLOC_FAIL, "malloc failed! %" LOG_PUBLIC "u", totalSize) in TranslateToInnerCurve25519Format()
555 (void)memset_s(buffer, totalSize, 0, totalSize); in TranslateToInnerCurve25519Format()
563 (void)memcpy_s(buffer + offset, totalSize - offset, key->data, key->size); in TranslateToInnerCurve25519Format()
565 publicKey->size = totalSize; in TranslateToInnerCurve25519Format()
Dhks_storage.c1184 uint32_t totalSize = keyCount * sizeof(struct HksFileEntry); in FileNameListInit() local
1185 *fileNameList = (struct HksFileEntry *)HksMalloc(totalSize); in FileNameListInit()
1188 (void)memset_s(*fileNameList, totalSize, 0, totalSize); in FileNameListInit()
/base/hiviewdfx/hiview/plugins/sysevent_source/
Dplatform_monitor.cpp205 perfMeasure.totalSize = totalSize_; in GetBreakStat()
229 eventCreator.SetKeyValue("TOTAL_SIZE", perfMeasure.totalSize); in CreateProfileReport()
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_service.c992 uint32_t totalSize = sizeof(struct HksKeyMaterial25519) + key->size; in GetCurve25519PrivateOrPairInnerFormat() local
993 uint8_t *buffer = (uint8_t *)HksMalloc(totalSize); in GetCurve25519PrivateOrPairInnerFormat()
994 …KS_IF_NULL_LOGE_RETURN(buffer, HKS_ERROR_MALLOC_FAIL, "malloc failed! %" LOG_PUBLIC "u", totalSize) in GetCurve25519PrivateOrPairInnerFormat()
996 (void)memset_s(buffer, totalSize, 0, totalSize); in GetCurve25519PrivateOrPairInnerFormat()
1004 (void)memcpy_s(buffer + offset, totalSize - offset, key->data, key->size); in GetCurve25519PrivateOrPairInnerFormat()
1006 outKey->size = totalSize; in GetCurve25519PrivateOrPairInnerFormat()
/base/account/os_account/services/accountmgr/test/unittest/account_iam/
Daccount_iam_manager_test.cpp85 int32_t GetTotalSizeOfVolume(std::string volumeUuid, int64_t &totalSize) in GetTotalSizeOfVolume() argument
100 int32_t GetTotalSize(int64_t &totalSize) in GetTotalSize() argument
/base/update/updater/test/unittest/test_data/diffpatch/
DPatchGztest_old.gz1[==========] Running 25 tests from 7 test ...
DPatchGztest_new.gz