/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/ |
D | hks_openssl_aes.c | 147 int32_t outLen = 0; in OpensslBlockCipherEncryptUpdate() 148 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != HKS_OPENSSL… in OpensslBlockCipherEncryptUpdate() 152 cipherText->size = (uint32_t)outLen; in OpensslBlockCipherEncryptUpdate() 169 int32_t outLen = 0; in OpensslBlockCipherHandleFinalThree() local 173 ? EVP_EncryptUpdate(ctx, output->data, &outLen, input->data, input->size) in OpensslBlockCipherHandleFinalThree() 174 : EVP_DecryptUpdate(ctx, output->data, &outLen, input->data, input->size); in OpensslBlockCipherHandleFinalThree() 181 output->size = (uint32_t)outLen; in OpensslBlockCipherHandleFinalThree() 183 ? EVP_EncryptFinal_ex(ctx, (output->data + outLen), &outLen) in OpensslBlockCipherHandleFinalThree() 184 : EVP_DecryptFinal_ex(ctx, (output->data + outLen), &outLen); in OpensslBlockCipherHandleFinalThree() 190 output->size += (uint32_t)outLen; in OpensslBlockCipherHandleFinalThree() [all …]
|
D | hks_openssl_bn.c | 68 int32_t outLen = BN_num_bytes(bnX); in BnExpModExport() local 69 if ((outLen < 0) || (x->size < (uint32_t)outLen) || x->size > INT32_MAX) { in BnExpModExport() 74 if (outLen == 0) { in BnExpModExport() 78 uint8_t *bnOutput = (uint8_t *)HksMalloc(outLen); in BnExpModExport() 84 if (realOutLen != outLen) { in BnExpModExport()
|
D | hks_openssl_rsa.c | 368 size_t outLen; in HksOpensslRsaCrypt() local 370 ret = EVP_PKEY_encrypt(ctx, NULL, &outLen, message->data, message->size); in HksOpensslRsaCrypt() 372 ret = EVP_PKEY_decrypt(ctx, NULL, &outLen, message->data, message->size); in HksOpensslRsaCrypt() 380 if (outLen > cipherText->size) { in HksOpensslRsaCrypt() 387 ret = EVP_PKEY_encrypt(ctx, cipherText->data, &outLen, message->data, message->size); in HksOpensslRsaCrypt() 389 ret = EVP_PKEY_decrypt(ctx, cipherText->data, &outLen, message->data, message->size); in HksOpensslRsaCrypt() 396 cipherText->size = outLen; in HksOpensslRsaCrypt()
|
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
D | openssl_aes_helper.c | 164 int outLen = 0; in AesEncrypt() local 165 if (EVP_EncryptUpdate(ctx, outData->data, &outLen, inData->data, inData->size) != 1) { in AesEncrypt() 169 outData->size = (uint32_t)outLen; in AesEncrypt() 170 if (EVP_EncryptFinal_ex(ctx, outData->data + outLen, &outLen) != 1) { in AesEncrypt() 174 outData->size += outLen; in AesEncrypt() 218 int outLen = 0; in AesDecrypt() local 219 if (EVP_DecryptUpdate(ctx, outData->data, &outLen, inData->data, inData->size) != 1) { in AesDecrypt() 223 outData->size = outLen; in AesDecrypt() 224 if (EVP_DecryptFinal_ex(ctx, outData->data + outLen, &outLen) != 1) { in AesDecrypt() 228 outData->size += (uint32_t)outLen; in AesDecrypt() [all …]
|
D | openssl_rsa_helper.c | 272 size_t outLen = outData->size; in EncryptRsa() local 273 if (EVP_PKEY_encrypt(ectx, outData->data, &outLen, inData->data, inData->size) != 1) { in EncryptRsa() 278 outData->size = outLen; in EncryptRsa() 320 size_t outLen = outData->size; in DecryptRsa() local 321 if (EVP_PKEY_decrypt(ectx, outData->data, &outLen, inData->data, inData->size) != 1) { in DecryptRsa() 326 outData->size = outLen; in DecryptRsa()
|
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/ |
D | hks_request.cpp | 49 uint32_t outLen = reply.ReadUint32(); in HksReadRequestReply() 50 if (outLen == 0) { in HksReadRequestReply() 59 const uint8_t *outData = reply.ReadBuffer(outLen); in HksReadRequestReply() 62 if (outBlob->size < outLen) { in HksReadRequestReply() 63 …G_E("outBlob size[%" LOG_PUBLIC "u] smaller than outLen[%" LOG_PUBLIC "u]", outBlob->size, outLen); in HksReadRequestReply() 67 (void)memcpy_s(outBlob->data, outBlob->size, outData, outLen); in HksReadRequestReply() 68 outBlob->size = outLen; in HksReadRequestReply()
|
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/ |
D | cm_request.cpp | 75 size_t outLen = reply.ReadUint32(); in CmReadRequestReply() local 76 if (outLen == 0) { in CmReadRequestReply() 86 const uint8_t *outData = reply.ReadBuffer(outLen); in CmReadRequestReply() 90 if (outBlob->size < outLen) { in CmReadRequestReply() 91 CM_LOG_E("outBlob size[%u] smaller than outLen[%u]", outBlob->size, outLen); in CmReadRequestReply() 94 if (memcpy_s(outBlob->data, outBlob->size, outData, outLen) != EOK) { in CmReadRequestReply() 97 outBlob->size = outLen; in CmReadRequestReply()
|
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/ |
D | dlp_crypt.cpp | 171 int32_t outLen = 0; in OpensslAesCipherEncryptFinal() local 173 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != DLP_OPENSSL… in OpensslAesCipherEncryptFinal() 178 cipherText->size = static_cast<uint32_t>(outLen); in OpensslAesCipherEncryptFinal() 180 if (EVP_EncryptFinal_ex(ctx, cipherText->data + outLen, &outLen) != DLP_OPENSSL_SUCCESS) { in OpensslAesCipherEncryptFinal() 185 cipherText->size += static_cast<uint32_t>(outLen); in OpensslAesCipherEncryptFinal() 274 int32_t outLen = 0; in OpensslAesCipherEncryptUpdate() local 275 …if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != DLP_OPENSSL… in OpensslAesCipherEncryptUpdate() 279 cipherText->size = static_cast<uint32_t>(outLen); in OpensslAesCipherEncryptUpdate() 297 int32_t outLen = 0; in OpensslAesCipherEncryptFinalThree() local 299 if (EVP_EncryptUpdate(ctx, cipherText->data, &outLen, message->data, message->size) != in OpensslAesCipherEncryptFinalThree() [all …]
|
/base/hiviewdfx/hilog_lite/frameworks/mini/ |
D | hiview_output_log.c | 427 int32 outLen = 0; in LogValuesFmt() local 433 for (i = 0; fmt[i] != 0 && outLen < desLen;) { in LogValuesFmt() 435 desStrPtr[outLen++] = fmt[i++]; in LogValuesFmt() 439 desStrPtr[outLen++] = fmt[i++]; in LogValuesFmt() 440 desStrPtr[outLen++] = fmt[i++]; in LogValuesFmt() 462 len = snprintf_s(&desStrPtr[outLen], desLen - outLen, desLen - outLen - 1, in LogValuesFmt() 467 outLen += len; in LogValuesFmt() 472 return outLen; in LogValuesFmt() 579 int32 outLen = 0; in LogValuesFmtHash() local 581 int32 ret = strncpy_s(&desStrPtr[outLen], desLen - outLen, "hash:", strlen("hash:")); in LogValuesFmtHash() [all …]
|
/base/security/device_security_level/services/dslm/ |
D | dslm_credential.c | 85 uint32_t outLen = len; in GetSupportedCredTypes() local 87 outLen = cb->credTypeCnt; in GetSupportedCredTypes() 89 for (uint32_t i = 0; i < outLen; i++) { in GetSupportedCredTypes() 92 return (int32_t)outLen; in GetSupportedCredTypes()
|
/base/security/device_security_level/baselib/utils/src/ |
D | utils_hexstring.c | 54 uint32_t outLen = strLen / BYTE_TO_HEX_OPER_LENGTH; in HexStringToByte() local 56 if (hexLen < outLen) { /* test the length */ in HexStringToByte() 63 for (uint32_t i = 0; i < outLen; i++) { in HexStringToByte()
|
/base/security/appverify/interfaces/innerkits/appverify/src/util/ |
D | hap_verify_openssl_utils.cpp | 563 uint32_t outLen = 0; in GetDigest() local 565 return outLen; in GetDigest() 567 if (EVP_DigestFinal(digestParameter.ptrCtx, out, &outLen) <= 0) { in GetDigest() 570 outLen = 0; in GetDigest() 572 return outLen; in GetDigest() 579 uint32_t outLen = 0; in GetDigest() local 582 return outLen; in GetDigest() 586 return outLen; in GetDigest() 592 return outLen; in GetDigest() 598 return outLen; in GetDigest() [all …]
|
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/ |
D | cipher_aes_openssl.c | 465 uint32_t outLen = AES_BLOCK_SIZE; in AllocateOutput() local 467 outLen += input->len; in AllocateOutput() 470 output->data = (uint8_t *)HcfMalloc(outLen, 0); in AllocateOutput() 475 output->len = outLen; in AllocateOutput() 547 uint32_t outLen = 0; in AllocateCcmOutput() local 549 outLen += input->len; in AllocateCcmOutput() 553 outLen += authTagLen + AES_BLOCK_SIZE; in AllocateCcmOutput() 554 if (outLen == 0) { in AllocateCcmOutput() 558 output->data = (uint8_t *)HcfMalloc(outLen, 0); in AllocateCcmOutput() 563 output->len = outLen; in AllocateCcmOutput() [all …]
|
D | cipher_3des_openssl.c | 148 uint32_t outLen = DES_BLOCK_SIZE; in AllocateOutput() local 150 outLen += input->len; in AllocateOutput() 152 output->data = (uint8_t *)HcfMalloc(outLen, 0); in AllocateOutput() 157 output->len = outLen; in AllocateOutput()
|
D | cipher_sm4_openssl.c | 249 uint32_t outLen = SM4_BLOCK_SIZE; in AllocateOutput() local 251 outLen += input->len; in AllocateOutput() 253 output->data = (uint8_t*)HcfMalloc(outLen, 0); in AllocateOutput() 258 output->len = outLen; in AllocateOutput()
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
D | cert_manager_uri.c | 559 uint32_t outLen = 0; in CmConstructUri() local 560 int32_t ret = CertManagerUriEncode(NULL, &outLen, uriObj); in CmConstructUri() 566 if ((outLen == 0) || (outLen > MAX_OUT_BLOB_SIZE)) { in CmConstructUri() 567 CM_LOG_E("invalid outLen[%u]", outLen); in CmConstructUri() 571 char *data = (char *)CMMalloc(outLen); in CmConstructUri() 576 (void)memset_s(data, outLen, 0, outLen); in CmConstructUri() 577 outUri->size = outLen; /* include 1 byte: the terminator('\0') */ in CmConstructUri() 579 ret = CertManagerUriEncode(data, &outLen, uriObj); /* outLen not include '\0' */ in CmConstructUri() 591 static int32_t UintToStr(uint32_t input, char *out, uint32_t outLen) in UintToStr() argument 593 if (snprintf_s(out, outLen, outLen - 1, "%u", input) < 0) { in UintToStr()
|
/base/security/huks/frameworks/huks_standard/main/core/src/ |
D | hks_verifier.c | 286 …c int32_t ExtractTlvLength(const uint8_t *in, uint32_t inLen, uint32_t *headSize, uint32_t *outLen) in ExtractTlvLength() argument 288 if ((in == NULL) || (inLen < ASN_1_MIN_HEADER_LEN) || (outLen == NULL)) { in ExtractTlvLength() 309 *outLen = length; in ExtractTlvLength() 313 static int32_t ExtractTlvData(const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen) in ExtractTlvData() argument 315 if ((in == NULL) || (inLen < ASN_1_MIN_HEADER_LEN) || (out == NULL) || (outLen == NULL)) { in ExtractTlvData() 336 if (memcpy_s(out, *outLen, buf, length) != EOK) { in ExtractTlvData() 340 *outLen = length; in ExtractTlvData() 345 uint8_t **out, uint32_t *outLen, uint32_t *size) in ExtractTlvDataAndHeadSize() argument 348 int32_t ret = ExtractTlvLength(in, inLen, &headOffset, outLen); in ExtractTlvDataAndHeadSize() 354 *out = (uint8_t *)HksMalloc(*outLen); in ExtractTlvDataAndHeadSize() [all …]
|
/base/update/updater/services/include/rust/ |
D | hash_signed_data.h | 25 size_t GetSigFromHashData(const HashSignedData *signed_data, uint8_t *out, size_t outLen, const cha…
|
/base/telephony/core_service/services/sim/src/ |
D | sim_utils.cpp | 118 int outLen = charBytesLen / HALF_LEN; in CharsConvertToChar16() local 119 outChar16Len = outLen; in CharsConvertToChar16() 123 char16_t *cache = (char16_t *)calloc(outLen + 1, sizeof(char16_t)); in CharsConvertToChar16() 127 (void)memset_s(cache, (outLen + 1) * sizeof(char16_t), 0, (outLen + 1) * sizeof(char16_t)); in CharsConvertToChar16()
|
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/ |
D | hks_crypto_hal_rsa_encrypt.cpp | 475 uint32_t outLen = inLen; in RunTestCase() local 477 outLen = HKS_KEY_BYTES(testCaseParams.keySize); in RunTestCase() 486 …HksBlob cipherText = { .size = outLen, .data = (uint8_t *)HksMalloc(outLen + HKS_PADDING_SUPPLENME… in RunTestCase()
|
D | hks_crypto_hal_aes_decrypt.cpp | 339 uint32_t outLen = inLen; in RunTestCase() local 341 … outLen = (inLen + HKS_PADDING_SUPPLENMENT) / HKS_PADDING_SUPPLENMENT * HKS_PADDING_SUPPLENMENT; in RunTestCase() 350 …HksBlob cipherText = { .size = outLen, .data = (uint8_t *)HksMalloc(outLen + HKS_PADDING_SUPPLENME… in RunTestCase() 472 uint32_t outLen = inLen; in GcmRunTestCase() local 478 …HksBlob cipherText = { .size = outLen, .data = (uint8_t *)HksMalloc(outLen + HKS_PADDING_SUPPLENME… in GcmRunTestCase()
|
D | hks_crypto_hal_aes_cipher.cpp | 618 …uint32_t outLen = (inLen + HKS_PADDING_SUPPLENMENT) / HKS_PADDING_SUPPLENMENT * HKS_PADDING_SUPPLE… in RunTestCaseThreeStage() local 627 HksBlob encryptAll = { .size = 0, .data = (uint8_t *)HksMalloc(outLen) }; in RunTestCaseThreeStage() 628 HksBlob decryptAll = { .size = 0, .data = (uint8_t *)HksMalloc(outLen) }; in RunTestCaseThreeStage() 713 …uint32_t outLen = (inLen + HKS_PADDING_SUPPLENMENT) / HKS_PADDING_SUPPLENMENT * HKS_PADDING_SUPPLE… in RunTestCaseThreeStageGCM() local 721 HksBlob encryptAll = { .size = 0, .data = (uint8_t *)HksMalloc(outLen) }; in RunTestCaseThreeStageGCM() 722 HksBlob decryptAll = { .size = 0, .data = (uint8_t *)HksMalloc(outLen) }; in RunTestCaseThreeStageGCM() 760 …uint32_t outLen = (inLen + HKS_PADDING_SUPPLENMENT) / HKS_PADDING_SUPPLENMENT * HKS_PADDING_SUPPLE… in RunTestCase() local 767 HksBlob cipherText = { .size = outLen, .data = (uint8_t *)HksMalloc(outLen) }; in RunTestCase() 768 HksBlob plaintext = { .size = outLen, .data = (uint8_t *)HksMalloc(outLen) }; in RunTestCase()
|
/base/telephony/sms_mms/frameworks/native/mms/src/ |
D | mms_msg.cpp | 64 std::unique_ptr<char[]> MmsMsg::EncodeMsg(uint32_t &outLen) in EncodeMsg() argument 81 outLen = encodeBuffer.GetCurPosition(); in EncodeMsg() 82 TELEPHONY_LOGI("NativeEncodeMms length:%{public}d", outLen); in EncodeMsg() 83 return encodeBuffer.ReadDataBuffer(0, outLen); in EncodeMsg()
|
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/ |
D | hks_crypto_ed25519.c | 166 uint32_t outLen = sizeof(struct KeyMaterial25519) + key->pubKeySize; in HksGetEd25519PubKey() local 167 if (memcpy_s(output->data, output->size, key, outLen) != EOK) { in HksGetEd25519PubKey() 173 output->size = outLen; in HksGetEd25519PubKey()
|
D | hks_mbedtls_ecc.c | 276 uint32_t outLen = sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize; in HksMbedtlsGetEccPubKey() local 277 if (memcpy_s(keyOut->data, keyOut->size, (void *)keyMaterial, outLen) != EOK) { in HksMbedtlsGetEccPubKey() 283 keyOut->size = outLen; in HksMbedtlsGetEccPubKey()
|