/base/security/crypto_framework/test/unittest/src/ |
D | sm4_common.cpp | 75 HcfBlob output = { .data = nullptr, .len = 0 }; in Sm4EncryptWithInput() local 83 ret = cipher->update(cipher, input, &output); in Sm4EncryptWithInput() 88 *cipherTextLen = output.len; in Sm4EncryptWithInput() 89 if (output.data != nullptr) { in Sm4EncryptWithInput() 90 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in Sm4EncryptWithInput() 91 HcfBlobDataFree(&output); in Sm4EncryptWithInput() 94 HcfBlobDataFree(&output); in Sm4EncryptWithInput() 97 ret = cipher->doFinal(cipher, nullptr, &output); in Sm4EncryptWithInput() 102 if (output.data != nullptr) { in Sm4EncryptWithInput() 103 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in Sm4EncryptWithInput() [all …]
|
D | crypto_hkdf_test.cpp | 63 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 75 .output = output, 89 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 100 .output = output, 118 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 130 .output = output, 140 .output = output, 144 EXPECT_EQ(params.output.data, params1.output.data); 157 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 166 .output = output, [all …]
|
D | crypto_pbkdf2_test.cpp | 66 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 75 .output = output, 88 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 96 .output = output, 109 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 118 .output = output, 132 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 142 .output = output, 157 HcfBlob output = {.data = out, .len = OUT_PUT_NORMAL_LENGTH}; variable 166 .output = output, [all …]
|
D | crypto_3des_cipher_test.cpp | 78 HcfBlob output = {}; in DesEncrypt() local 86 ret = cipher->update(cipher, &input, &output); in DesEncrypt() 91 *cipherTextLen = output.len; in DesEncrypt() 92 if (output.data != nullptr) { in DesEncrypt() 93 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesEncrypt() 94 HcfBlobDataFree(&output); in DesEncrypt() 97 HcfBlobDataFree(&output); in DesEncrypt() 100 ret = cipher->doFinal(cipher, nullptr, &output); in DesEncrypt() 105 if (output.data != nullptr) { in DesEncrypt() 106 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in DesEncrypt() [all …]
|
/base/security/crypto_framework/test/unittest/src/aes_cipher/ |
D | aes_common.cpp | 150 HcfBlob output = {}; in AesMultiBlockEncrypt() local 169 ret = cipher->update(cipher, &input, &output); in AesMultiBlockEncrypt() 174 if (output.data != nullptr && output.len > 0) { in AesMultiBlockEncrypt() 175 outfile.write(reinterpret_cast<const char *>(output.data), output.len); in AesMultiBlockEncrypt() 177 if (output.data != nullptr) { in AesMultiBlockEncrypt() 178 HcfFree(output.data); in AesMultiBlockEncrypt() 179 output.data = nullptr; in AesMultiBlockEncrypt() 182 ret = cipher->doFinal(cipher, nullptr, &output); in AesMultiBlockEncrypt() 187 if (output.data != nullptr && output.len > 0) { in AesMultiBlockEncrypt() 188 outfile.write(reinterpret_cast<const char *>(output.data), output.len); in AesMultiBlockEncrypt() [all …]
|
/base/inputmethod/imf/common/src/ |
D | itypes_util.cpp | 38 bool ITypesUtil::Unmarshalling(bool &output, MessageParcel &data) in Unmarshalling() argument 40 return data.ReadBool(output); in Unmarshalling() 48 bool ITypesUtil::Unmarshalling(uint32_t &output, MessageParcel &data) in Unmarshalling() argument 50 return data.ReadUint32(output); in Unmarshalling() 58 bool ITypesUtil::Unmarshalling(int32_t &output, MessageParcel &data) in Unmarshalling() argument 60 return data.ReadInt32(output); in Unmarshalling() 68 bool ITypesUtil::Unmarshalling(uint64_t &output, MessageParcel &data) in Unmarshalling() argument 70 return data.ReadUint64(output); in Unmarshalling() 78 bool ITypesUtil::Unmarshalling(double &output, MessageParcel &data) in Unmarshalling() argument 80 return data.ReadDouble(output); in Unmarshalling() [all …]
|
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/ |
D | hcfciphercreate_fuzzer.cpp | 38 HcfBlob output = {}; in AesEncrypt() local 45 ret = cipher->update(cipher, &input, &output); in AesEncrypt() 49 *cipherTextLen = output.len; in AesEncrypt() 50 if (output.len > 0 && output.data != nullptr) { in AesEncrypt() 51 (void)memcpy_s(cipherText, maxLen, output.data, output.len); in AesEncrypt() 53 if (output.data != nullptr) { in AesEncrypt() 54 HcfBlobDataClearAndFree(&output); in AesEncrypt() 55 output.data = nullptr; in AesEncrypt() 57 ret = cipher->doFinal(cipher, nullptr, &output); in AesEncrypt() 61 if (output.len > 0 && output.data != nullptr) { in AesEncrypt() [all …]
|
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/ |
D | cipher_aes_openssl.c | 488 static HcfResult CommonUpdate(CipherData *data, HcfBlob *input, HcfBlob *output) in CommonUpdate() argument 490 int32_t ret = OpensslEvpCipherUpdate(data->ctx, output->data, (int *)&output->len, in CommonUpdate() 500 static HcfResult AeadUpdate(CipherData *data, HcfAlgParaValue mode, HcfBlob *input, HcfBlob *output) in AeadUpdate() argument 503 …if (OpensslEvpCipherUpdate(data->ctx, NULL, (int *)&output->len, NULL, input->len) != HCF_OPENSSL_… in AeadUpdate() 510 …int32_t ret = OpensslEvpCipherUpdate(data->ctx, NULL, (int *)&output->len, data->aad, data->aadLen… in AeadUpdate() 516 …ret = OpensslEvpCipherUpdate(data->ctx, output->data, (int *)&output->len, input->data, input->len… in AeadUpdate() 525 static HcfResult AllocateOutput(HcfBlob *input, HcfBlob *output, bool *isUpdateInput) in AllocateOutput() argument 532 output->data = (uint8_t *)HcfMalloc(outLen, 0); in AllocateOutput() 533 if (output->data == NULL) { in AllocateOutput() 537 output->len = outLen; in AllocateOutput() [all …]
|
D | cipher_3des_openssl.c | 146 static HcfResult AllocateOutput(HcfBlob *input, HcfBlob *output) in AllocateOutput() argument 152 output->data = (uint8_t *)HcfMalloc(outLen, 0); in AllocateOutput() 153 if (output->data == NULL) { in AllocateOutput() 157 output->len = outLen; in AllocateOutput() 161 static HcfResult EngineUpdate(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineUpdate() argument 163 if ((self == NULL) || (input == NULL) || (output == NULL)) { in EngineUpdate() 178 HcfResult res = AllocateOutput(input, output); in EngineUpdate() 184 int32_t ret = OpensslEvpCipherUpdate(data->ctx, output->data, (int *)&output->len, in EngineUpdate() 195 HcfBlobDataFree(output); in EngineUpdate() 198 FreeRedundantOutput(output); in EngineUpdate() [all …]
|
D | cipher_sm4_openssl.c | 242 static HcfResult AllocateOutput(HcfBlob* input, HcfBlob* output) in AllocateOutput() argument 248 output->data = (uint8_t*)HcfMalloc(outLen, 0); in AllocateOutput() 249 if (output->data == NULL) { in AllocateOutput() 253 output->len = outLen; in AllocateOutput() 257 static HcfResult EngineUpdate(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineUpdate() argument 259 if ((self == NULL) || (input == NULL) || (output == NULL)) { in EngineUpdate() 275 if (AllocateOutput(input, output) == HCF_SUCCESS) { in EngineUpdate() 276 if (OpensslEvpCipherUpdate(data->ctx, output->data, (int*)&output->len, in EngineUpdate() 285 HcfBlobDataFree(output); in EngineUpdate() 288 FreeRedundantOutput(output); in EngineUpdate() [all …]
|
D | cipher_rsa_openssl.c | 365 static HcfResult EngineUpdate(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineUpdate() argument 370 (void)output; in EngineUpdate() 374 static HcfResult DoRsaCrypt(EVP_PKEY_CTX *ctx, HcfBlob *input, HcfBlob *output, int32_t mode) in DoRsaCrypt() argument 378 ret = OpensslEvpPkeyEncrypt(ctx, output->data, &output->len, input->data, input->len); in DoRsaCrypt() 380 ret = OpensslEvpPkeyDecrypt(ctx, output->data, &output->len, input->data, input->len); in DoRsaCrypt() 393 static HcfResult EngineDoFinal(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineDoFinal() argument 395 if (self == NULL || !IsBlobValid(input) || output == NULL) { in EngineDoFinal() 409 output->len = 0; in EngineDoFinal() 410 output->data = NULL; in EngineDoFinal() 411 HcfResult ret = DoRsaCrypt(impl->ctx, input, output, attr.mode); in EngineDoFinal() [all …]
|
D | cipher_sm2_openssl.c | 150 static HcfResult EngineUpdate(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineUpdate() argument 155 (void)output; in EngineUpdate() 180 …fResult DoSm2EncryptAndDecrypt(HcfCipherSm2GeneratorSpiImpl *impl, HcfBlob *input, HcfBlob *output, in DoSm2EncryptAndDecrypt() argument 204 output->data = outputText; in DoSm2EncryptAndDecrypt() 205 output->len = textLen; in DoSm2EncryptAndDecrypt() 209 static HcfResult DoSm2Crypt(HcfCipherSm2GeneratorSpiImpl *impl, HcfBlob *input, HcfBlob *output, in… in DoSm2Crypt() argument 216 if (DoSm2EncryptAndDecrypt(impl, input, output, mode, textLen) != HCF_SUCCESS) { in DoSm2Crypt() 222 static HcfResult EngineDoFinal(HcfCipherGeneratorSpi *self, HcfBlob *input, HcfBlob *output) in EngineDoFinal() argument 224 if (self == NULL || input == NULL || input->data == NULL || output == NULL) { in EngineDoFinal() 240 output->len = 0; in EngineDoFinal() [all …]
|
/base/update/updateservice/interfaces/inner_api/feature/update/model/upgrade_info/src/ |
D | upgrade_info.cpp | 23 std::string output = "upgradeApp:" + upgradeApp; in ToString() local 24 output += ",businessType(vender:" + businessType.vendor; in ToString() 25 output += ",subType:" + std::to_string(CAST_INT(businessType.subType)); in ToString() 26 output += "),upgradeDevId:" + AnonymousUtils::AnonymousString(upgradeDevId); in ToString() 27 output += ",controlDevId:" + AnonymousUtils::AnonymousString(controlDevId); in ToString() 28 return output; in ToString()
|
/base/security/crypto_framework/test/unittest/src/sm2/ |
D | crypto_sm2_util_test.cpp | 274 HcfBlob output = { .data = nullptr, .len = 0 }; variable 275 res = HcfGenCipherTextBySpec(spec, g_sm2ModeC1C3C2, &output); 277 res = memcmp(output.data, g_correctInput.data, g_correctInput.len); 278 HcfBlobDataFree(&output); 290 HcfBlob output = { .data = nullptr, .len = 0 }; variable 291 res = HcfGenCipherTextBySpec(spec, NULL, &output); 293 res = memcmp(output.data, g_correctInput.data, g_correctInput.len); 294 HcfBlobDataFree(&output); 305 HcfBlob output = { .data = nullptr, .len = 0 }; variable 306 res = HcfGenCipherTextBySpec(spec, g_sm2ModeError, &output); [all …]
|
/base/update/packaging_tools/test/ |
D | test_build_update.py | 64 output = "./output_test/demo" 65 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('zip') 91 output = "./output_test/demo" 92 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('zip') 118 output = "./output_test" 119 pkg_re = len(os.listdir(output)) 142 output = "./output_test/demo" 143 pkg_re = os.path.join(output, os.listdir(output)[0]).endswith('bin') 167 output = "./output_test/" 168 pkg_re = len(os.listdir(output)) [all …]
|
/base/update/updater/test/unittest/script/script_instruction/ |
D | script_updateprocesser_unittest.cpp | 54 int32_t ExtractFile(const std::string &fileId, StreamPtr output) override in ExtractFile() argument 83 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestUpdateProcesserSetProcess() local 84 EXPECT_EQ(output.size(), 0); in TestUpdateProcesserSetProcess() 97 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestUpdateProcesserSetProcess() local 98 EXPECT_EQ(output.size(), 0); in TestUpdateProcesserSetProcess() 117 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestUpdateProcesserShowProcess() local 118 EXPECT_EQ(output.size(), 0); in TestUpdateProcesserShowProcess() 126 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestUpdateProcesserShowProcess() local 127 EXPECT_EQ(output.size(), 0); in TestUpdateProcesserShowProcess() 137 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestUpdateProcesserShowProcess() local [all …]
|
D | basic_instruction_unittest.cpp | 86 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestBasicInstructionIsSubString01() local 87 ASSERT_EQ(output.size(), 1); in TestBasicInstructionIsSubString01() 88 EXPECT_EQ(output[0]->GetValueType(), UScriptValue::VALUE_TYPE_INTEGER); in TestBasicInstructionIsSubString01() 89 EXPECT_EQ(output[0]->ToString(), "0"); in TestBasicInstructionIsSubString01() 97 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestBasicInstructionIsSubString01() local 98 ASSERT_EQ(output.size(), 1); in TestBasicInstructionIsSubString01() 99 EXPECT_EQ(output[0]->GetValueType(), UScriptValue::VALUE_TYPE_INTEGER); in TestBasicInstructionIsSubString01() 100 EXPECT_EQ(output[0]->ToString(), "1"); in TestBasicInstructionIsSubString01() 111 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestBasicInstructionIsSubString02() local 112 EXPECT_EQ(output.size(), 0); in TestBasicInstructionIsSubString02() [all …]
|
D | script_registercmd_unittest.cpp | 34 int32_t ExtractFile(const std::string &fileId, StreamPtr output) override in ExtractFile() argument 62 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestRegisterCmd01() local 63 EXPECT_EQ(output.size(), 0); in TestRegisterCmd01() 76 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestRegisterCmd02() local 77 EXPECT_EQ(output.size(), 0); in TestRegisterCmd02() 90 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestRegisterCmd03() local 91 EXPECT_EQ(output.size(), 0); in TestRegisterCmd03()
|
D | script_loadscript_unittest.cpp | 33 int32_t ExtractFile(const std::string &fileId, StreamPtr output) override in ExtractFile() argument 61 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestLoadScript01() local 62 EXPECT_EQ(output.size(), 0); in TestLoadScript01() 76 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestLoadScript02() local 77 EXPECT_EQ(output.size(), 0); in TestLoadScript02() 91 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestLoadScript03() local 92 EXPECT_EQ(output.size(), 0); in TestLoadScript03()
|
/base/hiviewdfx/faultloggerd/interfaces/common/ |
D | dfx_frame.h | 89 std::string output = StringPrintf("0x%016" PRIx64 " : ", pc); in ToSymbolString() local 90 output.append(funcName); in ToSymbolString() 92 output += StringPrintf("[0x%016" PRIx64 ":0x%016" PRIx64 "][+0x%" PRIx64 "]", in ToSymbolString() 95 output.append("@"); in ToSymbolString() 96 output.append(mapName); in ToSymbolString() 97 output.append(":"); in ToSymbolString() 98 output.append(std::to_string(index)); in ToSymbolString() 99 return output; in ToSymbolString()
|
/base/hiviewdfx/faultloggerd/test/unittest/services/ |
D | faultlogger_config_test.cpp | 51 int output = config->GetLogFileMaxNumber(); variable 52 EXPECT_EQ(true, input == output); 70 long output = config->GetLogFileMaxSize(); variable 71 EXPECT_EQ(true, input == output); 89 std::string output = config->GetLogFilePath(); variable 90 EXPECT_EQ(true, input == output); 108 std::string output = config->GetDebugLogFilePath(); variable 109 EXPECT_EQ(true, input == output);
|
/base/inputmethod/imf/common/include/ |
D | itypes_util.h | 38 static bool Unmarshalling(bool &output, MessageParcel &data); 41 static bool Unmarshalling(uint32_t &output, MessageParcel &data); 44 static bool Unmarshalling(int32_t &output, MessageParcel &data); 47 static bool Unmarshalling(uint64_t &output, MessageParcel &data); 50 static bool Unmarshalling(double &output, MessageParcel &data); 53 static bool Unmarshalling(std::u16string &output, MessageParcel &data); 56 static bool Unmarshalling(std::string &output, MessageParcel &data); 59 static bool Unmarshalling(std::vector<uint8_t> &output, MessageParcel &data); 62 static bool Unmarshalling(sptr<IRemoteObject> &output, MessageParcel &data); 65 static bool Unmarshalling(Property &output, MessageParcel &data); [all …]
|
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfsm2create_fuzzer/ |
D | hcfsm2create_fuzzer.cpp | 91 HcfBlob output = { .data = nullptr, .len = 0 }; in TestHcfGenCipherTextBySpec() local 92 res = HcfGenCipherTextBySpec(spec, g_sm2ModeC1C3C2, &output); in TestHcfGenCipherTextBySpec() 97 (void)memcmp(output.data, g_correctInput.data, g_correctInput.len); in TestHcfGenCipherTextBySpec() 98 HcfBlobDataFree(&output); in TestHcfGenCipherTextBySpec() 130 HcfBlob output = { .data = nullptr, .len = 0 }; in HcfSm2CreateFuzzTest() local 131 HcfGenCipherTextBySpec(&spec, g_sm2ModeC1C3C2, &output); in HcfSm2CreateFuzzTest() 133 HcfBlobDataFree(&output); in HcfSm2CreateFuzzTest()
|
/base/update/updater/test/unittest/flashd_test/ |
D | flashd_utils.cpp | 50 std::vector<std::string> output = Split(input, { "-f" }); variable 52 for (auto s : output) { 57 output = Split(input, { "-f" }); 59 for (auto s : output) {
|
/base/update/updater/test/unittest/updater_binary/ |
D | update_image_patch_unittest.cpp | 41 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestImgPatch01() local 42 EXPECT_EQ(output.size(), 1); in TestImgPatch01() 58 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestImgPatch02() local 59 EXPECT_EQ(output.size(), 1); in TestImgPatch02() 75 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestImgPatch03() local 76 EXPECT_EQ(output.size(), 1); in TestImgPatch03() 92 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestImgPatch04() local 93 EXPECT_EQ(output.size(), 1); in TestImgPatch04() 111 std::vector<UScriptValuePtr> output = context.GetOutVar(); in TestImgPatch05() local 112 EXPECT_EQ(output.size(), 1); in TestImgPatch05() [all …]
|