Home
last modified time | relevance | path

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

1234567891011

/base/security/crypto_framework/test/unittest/src/
Dsm4_common.cpp75 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 …]
Dcrypto_hkdf_test.cpp63 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 …]
Dcrypto_pbkdf2_test.cpp66 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 …]
Dcrypto_3des_cipher_test.cpp78 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/
Daes_common.cpp150 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/
Ditypes_util.cpp38 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/
Dhcfciphercreate_fuzzer.cpp38 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/
Dcipher_aes_openssl.c488 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 …]
Dcipher_3des_openssl.c146 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 …]
Dcipher_sm4_openssl.c242 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 …]
Dcipher_rsa_openssl.c365 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 …]
Dcipher_sm2_openssl.c150 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/
Dupgrade_info.cpp23 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/
Dcrypto_sm2_util_test.cpp274 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/
Dtest_build_update.py64 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/
Dscript_updateprocesser_unittest.cpp54 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 …]
Dbasic_instruction_unittest.cpp86 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 …]
Dscript_registercmd_unittest.cpp34 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()
Dscript_loadscript_unittest.cpp33 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/
Ddfx_frame.h89 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/
Dfaultlogger_config_test.cpp51 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/
Ditypes_util.h38 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/
Dhcfsm2create_fuzzer.cpp91 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/
Dflashd_utils.cpp50 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/
Dupdate_image_patch_unittest.cpp41 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 …]

1234567891011