/base/security/crypto_framework/test/unittest/src/ |
D | crypto_ecc_sign_test.cpp | 138 HcfSign *sign = nullptr; variable 139 int32_t res = HcfSignCreate("ECC224|SHA1", &sign); 142 ASSERT_NE(sign, nullptr); 144 HcfObjDestroy(sign); 149 HcfSign *sign = nullptr; variable 150 int32_t res = HcfSignCreate("ECC224|SHA224", &sign); 153 ASSERT_NE(sign, nullptr); 155 HcfObjDestroy(sign); 160 HcfSign *sign = nullptr; variable 161 int32_t res = HcfSignCreate("ECC224|SHA256", &sign); [all …]
|
D | crypto_ecc_no_length_sign_test.cpp | 306 HcfSign *sign = nullptr; variable 307 int32_t res = HcfSignCreate("ECC|SHA1", &sign); 310 ASSERT_NE(sign, nullptr); 312 HcfObjDestroy(sign); 317 HcfSign *sign = nullptr; variable 318 int32_t res = HcfSignCreate("ECC|SHA224", &sign); 321 ASSERT_NE(sign, nullptr); 323 HcfObjDestroy(sign); 328 HcfSign *sign = nullptr; variable 329 int32_t res = HcfSignCreate("ECC|SHA256", &sign); [all …]
|
D | crypto_sm2_sign_test.cpp | 87 HcfSign *sign = nullptr; variable 88 int32_t res = HcfSignCreate("SM2|SM3", &sign); 91 ASSERT_NE(sign, nullptr); 93 HcfObjDestroy(sign); 98 HcfSign *sign = nullptr; variable 99 int32_t res = HcfSignCreate(nullptr, &sign); 102 ASSERT_EQ(sign, nullptr); 107 HcfSign *sign = nullptr; variable 109 "ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD", &sign); 112 ASSERT_EQ(sign, nullptr); [all …]
|
D | crypto_rsa_sign_test.cpp | 170 HcfSign *sign = nullptr; variable 171 res = HcfSignCreate("RSA1024|PKCS1|MD5", &sign); 173 EXPECT_NE(sign, nullptr); 174 EXPECT_NE(sign->base.getClass(), nullptr); 175 EXPECT_NE(sign->base.destroy, nullptr); 176 EXPECT_NE(sign->init, nullptr); 177 EXPECT_NE(sign->update, nullptr); 178 EXPECT_NE(sign->sign, nullptr); 179 HcfObjDestroy(sign); 185 HcfSign *sign = nullptr; variable [all …]
|
D | crypto_dsa_sign_test.cpp | 435 HcfSign *sign = nullptr; variable 436 HcfResult ret = HcfSignCreate("DSA2048|NoHash", &sign); 439 ASSERT_NE(sign, nullptr); 441 HcfObjDestroy(sign); 446 HcfSign *sign = nullptr; variable 447 HcfResult ret = HcfSignCreate("DSA2048|NoHash", &sign); 450 ASSERT_NE(sign, nullptr); 452 const char *signClassName = sign->base.getClass(); 453 HcfObjDestroy(sign); 459 HcfSign *sign = nullptr; variable [all …]
|
D | crypto_ecc_verify_test.cpp | 1394 HcfSign *sign = nullptr; variable 1395 int32_t res = HcfSignCreate("ECC224|SHA1", &sign); 1398 ASSERT_NE(sign, nullptr); 1400 res = sign->init(sign, nullptr, ecc224KeyPair_->priKey); 1404 res = sign->update(sign, &g_mockInput); 1409 res = sign->sign(sign, nullptr, &out); 1434 HcfObjDestroy(sign); 1440 HcfSign *sign = nullptr; variable 1441 int32_t res = HcfSignCreate("ECC224|SHA224", &sign); 1444 ASSERT_NE(sign, nullptr); [all …]
|
D | crypto_ecc_no_length_verify_test.cpp | 1380 HcfSign *sign = nullptr; variable 1381 int32_t res = HcfSignCreate("ECC|SHA1", &sign); 1384 ASSERT_NE(sign, nullptr); 1386 res = sign->init(sign, nullptr, ecc224KeyPair_->priKey); 1390 res = sign->update(sign, &g_mockInput); 1395 res = sign->sign(sign, nullptr, &out); 1420 HcfObjDestroy(sign); 1426 HcfSign *sign = nullptr; variable 1427 int32_t res = HcfSignCreate("ECC|SHA224", &sign); 1430 ASSERT_NE(sign, nullptr); [all …]
|
D | crypto_rsa_verify_test.cpp | 385 HcfSign *sign = nullptr; variable 386 res = HcfSignCreate("RSA1024|PSS|SHA256|MGF1_SHA256", &sign); 388 res = sign->init(sign, nullptr, prikey); 390 res = sign->sign(sign, &input, &verifyData); 391 HcfObjDestroy(sign); 423 HcfSign *sign = nullptr; variable 424 res = HcfSignCreate("RSA1024|PSS|SHA256|MGF1_SHA256", &sign); 426 res = sign->init(sign, nullptr, prikey); 428 res = sign->sign(sign, &input, &verifyData); 429 HcfObjDestroy(sign); [all …]
|
D | crypto_sm2_verify_test.cpp | 424 HcfSign *sign = nullptr; variable 425 int32_t res = HcfSignCreate("SM2|SM3", &sign); 428 ASSERT_NE(sign, nullptr); 430 res = sign->init(sign, nullptr, sm2256KeyPair_->priKey); 434 res = sign->update(sign, &g_mockInput); 439 res = sign->sign(sign, nullptr, &out); 464 HcfObjDestroy(sign); 470 HcfSign *sign = nullptr; variable 471 int32_t res = HcfSignCreate("SM2|SM3", &sign); 474 ASSERT_NE(sign, nullptr); [all …]
|
D | crypto_signature_exception_test.cpp | 148 HcfSign *sign = nullptr; variable 149 HcfResult res = HcfSignCreate("DSA1024|SHA256", &sign); 151 ASSERT_NE(sign, nullptr); 153 HcfSignSpi signObj { .base = *(HcfObjectBase *)sign }; 164 sign->base.destroy((HcfObjectBase *)sign);
|
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfsigncreate_fuzzer/ |
D | hcfsigncreate_fuzzer.cpp | 46 HcfSign *sign = nullptr; in TestSign() local 47 res = HcfSignCreate("ECC384|SHA384", &sign); in TestSign() 56 (void)sign->init(sign, nullptr, ecc384KeyPair->priKey); in TestSign() 57 (void)sign->update(sign, &mockInput); in TestSign() 59 HcfObjDestroy(sign); in TestSign() 65 HcfSign *sign = nullptr; in HcfSignCreateFuzzTest() local 67 HcfResult res = HcfSignCreate(algoName.c_str(), &sign); in HcfSignCreateFuzzTest() 71 HcfObjDestroy(sign); in HcfSignCreateFuzzTest()
|
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfverifycreate_fuzzer/ |
D | hcfverifycreate_fuzzer.cpp | 46 HcfSign *sign = nullptr; in TestVerify() local 47 res = HcfSignCreate("ECC224|SHA384", &sign); in TestVerify() 56 (void)sign->init(sign, nullptr, ecc224KeyPair->priKey); in TestVerify() 57 (void)sign->update(sign, &mockInput); in TestVerify() 63 HcfObjDestroy(sign); in TestVerify() 70 (void)sign->sign(sign, nullptr, &out); in TestVerify() 75 HcfObjDestroy(sign); in TestVerify()
|
/base/update/updater/services/package/pkg_algorithm/ |
D | pkg_algo_sign.cpp | 35 int32_t SignAlgorithmRsa::SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &s… in SignBuffer() argument 63 sign.resize(size); in SignBuffer() 66 ret = RSA_sign(NID_sha256, buffer.buffer, buffer.length, sign.data(), &size, rsa); in SignBuffer() 68 ret = RSA_sign(NID_sha384, buffer.buffer, buffer.length, sign.data(), &size, rsa); in SignBuffer() 75 int32_t SignAlgorithmEcc::SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &s… in SignBuffer() argument 103 sign.resize(size + sizeof(uint32_t)); in SignBuffer() 104 ret = ECDSA_sign(0, buffer.buffer, buffer.length, sign.data() + sizeof(uint32_t), &size, ecKey); in SignBuffer() 105 WriteLE32(sign.data(), size); in SignBuffer()
|
D | pkg_algo_sign.h | 51 …virtual int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) c… 67 …int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) const ove… in SignBuffer() argument 70 UNUSED(sign); in SignBuffer() 82 …int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) const ove… 91 …int32_t SignBuffer(const PkgBuffer &buffer, std::vector<uint8_t> &sign, size_t &signLen) const ove…
|
/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
D | napi_sign.cpp | 38 HcfSign *sign = nullptr; member 55 HcfSign *sign; member 71 HcfSign *sign; member 172 ctx->sign = napiSign->GetSign(); in BuildSignJsInitCtx() 211 ctx->sign = napiSign->GetSign(); in BuildSignJsUpdateCtx() 254 ctx->sign = napiSign->GetSign(); in BuildSignJsDoFinalCtx() 350 ctx->errCode = ctx->sign->init(ctx->sign, ctx->params, ctx->priKey); in SignJsInitAsyncWorkProcess() 373 ctx->errCode = ctx->sign->update(ctx->sign, ctx->data); in SignJsUpdateAsyncWorkProcess() 396 ctx->errCode = ctx->sign->sign(ctx->sign, ctx->data, &ctx->returnSignatureData); in SignJsDoFinalAsyncWorkProcess() 498 NapiSign::NapiSign(HcfSign *sign) in NapiSign() argument [all …]
|
/base/global/i18n_lite/frameworks/i18n/src/ |
D | str_util.cpp | 25 int ReplaceAndCountOff(std::string &content, const int index, const char *sign, const int off) in ReplaceAndCountOff() argument 27 …if ((sign == nullptr) || (index < 0) || (static_cast<unsigned int>(index) > strlen(content.data())… in ReplaceAndCountOff() 30 content = content.replace(index, 1, sign); in ReplaceAndCountOff() 31 int signLen = strlen(sign); in ReplaceAndCountOff()
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
D | hks_cross_test.cpp | 272 uint8_t sign[CROSS_COMMON_SIZE] = {0}; variable 273 struct HksBlob signedData = { CROSS_COMMON_SIZE, sign }; 316 uint8_t sign[CROSS_COMMON_SIZE] = {0}; variable 317 struct HksBlob signedData = { CROSS_COMMON_SIZE, sign }; 363 uint8_t sign[CROSS_COMMON_SIZE] = {0}; variable 364 struct HksBlob signedData = { CROSS_COMMON_SIZE, sign }; 408 uint8_t sign[CROSS_COMMON_SIZE] = {0}; variable 409 struct HksBlob signedData = { CROSS_COMMON_SIZE, sign }; 452 uint8_t sign[CROSS_COMMON_SIZE] = {0}; variable 453 struct HksBlob signedData = { CROSS_COMMON_SIZE, sign }; [all …]
|
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
D | openssl_ecc_helper.c | 215 static EC_KEY *EccInitKey(const struct HksBlob *keyBlob, bool sign) in EccInitKey() argument 243 if (sign) { in EccInitKey() 260 static EVP_MD_CTX *InitEccMdCtx(const struct HksBlob *mainKey, uint32_t digest, bool sign) in InitEccMdCtx() argument 264 EC_KEY *eccKey = EccInitKey(mainKey, sign); in InitEccMdCtx() 287 if (sign) { in InitEccMdCtx() 333 static EVP_PKEY_CTX *InitEcdsaCtx(const struct HksBlob *mainKey, bool sign, uint32_t len) in InitEcdsaCtx() argument 342 EC_KEY *eccKey = EccInitKey(mainKey, sign); in InitEcdsaCtx() 365 if (sign) { in InitEcdsaCtx()
|
/base/global/i18n_lite/frameworks/i18n/include/ |
D | str_util.h | 25 int ReplaceAndCountOff(std::string &content, const int index, const char *sign, const int off);
|
/base/update/updater/test/unittest/package/ |
D | pkg_algo_unittest.cpp | 119 …SignAlgorithm::SignAlgorithmPtr sign = PkgAlgorithmFactory::GetSignAlgorithm(TEST_PATH_FROM, inval… in TestInvalidParam() local 120 EXPECT_EQ(nullptr, sign); in TestInvalidParam() 128 EXPECT_EQ(nullptr, sign); in TestInvalidParam()
|
/base/security/crypto_framework/frameworks/js/napi/crypto/inc/ |
D | napi_sign.h | 29 explicit NapiSign(HcfSign *sign);
|
/base/notification/distributed_notification_service/services/distributed/src/ |
D | distributed_preferences.cpp | 92 std::string sign = key.substr(typeLabelPosition, typeLabelEndPosition - typeLabelPosition); in ResolveDistributedKey() local 93 if (sign == MAIN_LABEL) { in ResolveDistributedKey() 96 if (sign == WITHOUT_APP) { in ResolveDistributedKey()
|
/base/startup/hvb/libhvb/src/cert/ |
D | hvb_cert.c | 217 hvb_memcpy(&sign_info->sign, &buf, sizeof(buf)); in _hvb_cert_signature_parser() 345 …cry_err = hvb_rsa_verify_pss(&pubk, hash, hash_len, sign_info->sign.addr, sign_info->sign.size, sa… in hvb_verify_cert() 398 tbs.size = sign_info->sign.addr - cert_buf->addr; in cert_init_desc()
|
/base/security/crypto_framework/interfaces/innerkits/crypto_operation/ |
D | signature.h | 42 HcfResult (*sign)(HcfSign *self, HcfBlob *data, HcfBlob *returnSignatureData); member
|
/base/startup/hvb/libhvb/include/ |
D | hvb_cert.h | 68 struct hvb_buf sign; member
|