/ohos5.0/base/security/crypto_framework/common/src/ |
H A D | asy_key_params.c | 102 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyDsaKeyPairSpec() 133 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyDhPriKeySpec() 149 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyDhKeyPairSpec() 218 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyEccPriKeySpec() 233 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyEccKeyPairSpec() 277 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyRsaKeyPairSpec() 368 (void)memset_s(spec->pk.data, spec->pk.len, 0, spec->pk.len); in DestroyAlg25519PubKeySpec() 385 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyAlg25519PriKeySpec() 402 (void)memset_s(spec->pk.data, spec->pk.len, 0, spec->pk.len); in DestroyAlg25519KeyPairSpec() 407 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyAlg25519KeyPairSpec() [all …]
|
/ohos5.0/base/security/crypto_framework/test/unittest/src/aes_cipher/ |
H A D | crypto_aes_gcm_cipher_test.cpp | 84 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 138 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 192 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 246 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 300 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 354 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 408 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 461 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 711 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 765 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); [all …]
|
H A D | crypto_aes_ccm_cipher_test.cpp | 57 spec.aad.data = aad; 61 spec.iv.data = iv; 83 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); 114 spec.iv.data = iv; 136 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); 189 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); 242 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); 295 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); 349 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); 402 PrintfHex("ccm tag", spec.tag.data, spec.tag.len); [all …]
|
/ohos5.0/base/security/crypto_framework/test/unittest/src/ |
H A D | crypto_sm4_gcm_cipher_test.cpp | 86 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 140 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 194 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 248 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 302 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 356 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 607 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 661 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 715 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); 770 PrintfHex("gcm tag", spec.tag.data, spec.tag.len); [all …]
|
H A D | crypto_common_cov_test.cpp | 466 EXPECT_EQ(spec, nullptr); 472 DestroyDsaPubKeySpec(spec); 473 EXPECT_EQ(spec, nullptr); 480 EXPECT_EQ(spec, nullptr); 487 EXPECT_EQ(spec, nullptr); 494 EXPECT_EQ(spec, nullptr); 501 EXPECT_EQ(spec, nullptr); 508 EXPECT_EQ(spec, nullptr); 515 EXPECT_EQ(spec, nullptr); 522 EXPECT_EQ(spec, nullptr); [all …]
|
/ohos5.0/base/security/crypto_framework/test/unittest/src/sm2/ |
H A D | crypto_sm2_util_test.cpp | 279 HcfFree(spec); 295 HcfFree(spec); 308 HcfFree(spec); 320 HcfFree(spec); 332 HcfFree(spec); 344 HcfFree(spec); 356 HcfFree(spec); 368 HcfFree(spec); 379 HcfFree(spec); 399 HcfFree(spec); [all …]
|
/ohos5.0/base/security/crypto_framework/test/unittest/include/ |
H A D | ecc_asy_key_common.h | 26 HcfResult ConstructEcc192CommParamsSpec(HcfAsyKeyParamsSpec **spec); 27 HcfResult ConstructEcc224CommParamsSpec(HcfAsyKeyParamsSpec **spec); 28 HcfResult ConstructEcc224PubKeyParamsSpec(HcfAsyKeyParamsSpec **spec); 29 HcfResult ConstructEcc224PriKeyParamsSpec(HcfAsyKeyParamsSpec **spec); 30 HcfResult ConstructEcc224KeyPairParamsSpec(HcfAsyKeyParamsSpec **spec); 31 HcfResult ConstructEcc256CommParamsSpec(HcfAsyKeyParamsSpec **spec); 32 HcfResult ConstructEcc256PubKeyParamsSpec(HcfAsyKeyParamsSpec **spec); 33 HcfResult ConstructEcc256PriKeyParamsSpec(HcfAsyKeyParamsSpec **spec); 35 HcfResult ConstructEcc384CommParamsSpec(HcfAsyKeyParamsSpec **spec); 36 HcfResult ConstructEcc384PubKeyParamsSpec(HcfAsyKeyParamsSpec **spec); [all …]
|
/ohos5.0/base/security/certificate_manager/test/unittest/src/ |
H A D | cm_finish_test.cpp | 85 int32_t ret = CmInit(keyUri, spec, &handle); in TestSign() 105 int32_t ret = CmInit(keyUri, spec, &handle); in TestVerify() 138 if (spec->digest != CM_DIGEST_NONE) { in TestSignVerify() 150 spec->purpose = CM_KEY_PURPOSE_SIGN; in TestSignVerify() 151 TestSign(&g_keyUri, spec, &message, &signature); in TestSignVerify() 154 spec->purpose = CM_KEY_PURPOSE_VERIFY; in TestSignVerify() 307 TestSignVerify(CERT_KEY_ALG_RSA, true, &spec); 319 TestSignVerify(CERT_KEY_ALG_ECC, true, &spec); 396 TestSignVerify(CERT_KEY_ALG_RSA, true, &spec); 408 TestSignVerify(CERT_KEY_ALG_RSA, true, &spec); [all …]
|
H A D | cm_init_test.cpp | 89 int32_t ret = CmInit(authUri, &spec, &handle); 107 int32_t ret = CmInit(&authUri, &spec, &handle); 125 int32_t ret = CmInit(&authUri, &spec, &handle); 143 int32_t ret = CmInit(&authUri, &spec, &handle); 161 int32_t ret = CmInit(&authUri, &spec, &handle); 179 int32_t ret = CmInit(&authUri, &spec, &handle); 197 int32_t ret = CmInit(&authUri, &spec, &handle); 215 int32_t ret = CmInit(&authUri, &spec, &handle); 231 int32_t ret = CmInit(&g_rsaKeyUri, spec, &handle); 262 int32_t ret = CmInit(&g_rsaKeyUri, &spec, handle); [all …]
|
/ohos5.0/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfsm2create_fuzzer/ |
H A D | hcfsm2create_fuzzer.cpp | 78 *spec = tempSpec; in ConstructCorrectSm2CipherTextXSpec() 96 *spec = tempSpec; in ConstructCorrectSm2CipherTextYSpec() 114 *spec = tempSpec; in ConstructCorrectSm2CipherTextSpec() 133 HcfFree(spec); in TestHcfGenCipherTextBySpec() 140 HcfFree(spec); in TestHcfGenCipherTextBySpec() 158 HcfFree(spec); in TestHcfGenCipherTextByXSpec() 165 HcfFree(spec); in TestHcfGenCipherTextByXSpec() 183 HcfFree(spec); in TestHcfGenCipherTextByYSpec() 190 HcfFree(spec); in TestHcfGenCipherTextByYSpec() 213 DestroySm2CipherTextSpec(spec); in TestHcfGetCipherTextSpec() [all …]
|
/ohos5.0/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
H A D | napi_utils.cpp | 623 HcfFree(spec); in GetDsaCommonAsyKeySpec() 642 HcfFree(spec); in GetDsaPubKeySpec() 647 HcfFree(spec); in GetDsaPubKeySpec() 674 HcfFree(spec); in GetDsaKeyPairAsyKeySpec() 679 HcfFree(spec); in GetDsaKeyPairAsyKeySpec() 688 HcfFree(spec); in GetDsaKeyPairAsyKeySpec() 696 HcfFree(spec); in GetDsaKeyPairAsyKeySpec() 875 HcfFree(spec); in GetEccCommonAsyKeySpec() 894 HcfFree(spec); in GetEccPriKeySpec() 899 HcfFree(spec); in GetEccPriKeySpec() [all …]
|
H A D | napi_sm2_crypto_util.cpp | 121 Sm2CipherTextSpec *spec = nullptr; in JsGenCipherTextBySpec() local 131 DestroySm2CipherTextSpec(spec); in JsGenCipherTextBySpec() 139 DestroySm2CipherTextSpec(spec); in JsGenCipherTextBySpec() 147 DestroySm2CipherTextSpec(spec); in JsGenCipherTextBySpec() 154 DestroySm2CipherTextSpec(spec); in JsGenCipherTextBySpec() 160 if (spec == nullptr) { in CheckSm2CipherTextSpec() 164 if (spec->xCoordinate.data == nullptr || spec->xCoordinate.len == 0) { in CheckSm2CipherTextSpec() 168 if (spec->yCoordinate.data == nullptr || spec->yCoordinate.len == 0) { in CheckSm2CipherTextSpec() 172 if (spec->cipherTextData.data == nullptr || spec->cipherTextData.len == 0) { in CheckSm2CipherTextSpec() 176 if (spec->hashData.data == nullptr || spec->hashData.len == 0) { in CheckSm2CipherTextSpec() [all …]
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/ |
H A D | hks_crypto_hal_api_openssl.cpp | 68 HksKeySpec spec = { variable 86 HksKeySpec spec = { variable 106 HksKeySpec spec = { variable 133 spec.algType = HKS_ALG_DH; 227 spec.mode = HKS_MODE_CBC; 231 spec.mode = HKS_MODE_CTR; 235 spec.mode = HKS_MODE_ECB; 360 HksKeySpec spec = { variable 407 HksKeySpec spec = { variable 466 HksKeySpec spec = { variable [all …]
|
H A D | hks_crypto_hal_api_mbedtls.cpp | 67 HksKeySpec spec = { variable 86 HksKeySpec spec = { variable 107 HksKeySpec spec = { variable 335 HksKeySpec spec = { variable 370 HksKeySpec spec = { variable 376 spec.keyLen += 1; 390 HksKeySpec spec = { variable 435 HksKeySpec spec = { variable 441 spec.keyLen += 1; 455 HksKeySpec spec = { variable [all …]
|
H A D | hks_crypto_hal_rsa_sign.cpp | 47 .spec = { 67 .spec = { 87 .spec = { 107 .spec = { 127 .spec = { 147 .spec = { 167 .spec = { 187 .spec = { 207 .spec = { 228 .spec = { [all …]
|
H A D | hks_crypto_hal_rsa_cipher.cpp | 44 .spec = { 71 .spec = { 99 .spec = { 128 .spec = { 159 .spec = { 192 .spec = { 229 .spec = { 250 .spec = { 271 .spec = { 293 .spec = { [all …]
|
H A D | hks_crypto_hal_ecdsa_sign.cpp | 48 .spec = { 68 .spec = { 87 .spec = { 106 .spec = { 126 .spec = { 145 .spec = { 164 .spec = { 183 .spec = { 202 .spec = { 221 .spec = { [all …]
|
/ohos5.0/base/security/crypto_framework/frameworks/key/ |
H A D | asy_key_generator.c | 620 HcfFree(spec); in CreateDsaCommonSpecImpl() 624 *destSpec = spec; in CreateDsaCommonSpecImpl() 636 HcfFree(spec); in CreateDsaPubKeySpecImpl() 643 HcfFree(spec); in CreateDsaPubKeySpecImpl() 649 *destSpec = spec; in CreateDsaPubKeySpecImpl() 684 *destSpec = spec; in CreateDsaKeyPairSpecImpl() 733 *destSpec = spec; in CreateDhPubKeySpecImpl() 759 *destSpec = spec; in CreateDhPriKeySpecImpl() 795 *destSpec = spec; in CreateDhKeyPairSpecImpl() 972 *destSpec = spec; in CreateRsaPubKeySpecImpl() [all …]
|
/ohos5.0/base/security/crypto_framework/frameworks/crypto_operation/ |
H A D | sm2_crypto_util.c | 25 typedef HcfResult (*HcfSm2SpecToASN1CreateFunc)(Sm2CipherTextSpec *spec, HcfBlob *output); 64 static bool CheckSm2CipherTextSpec(Sm2CipherTextSpec *spec) in CheckSm2CipherTextSpec() argument 66 if (spec == NULL) { in CheckSm2CipherTextSpec() 70 if ((spec->xCoordinate.data == NULL) || (spec->xCoordinate.len == 0)) { in CheckSm2CipherTextSpec() 74 if ((spec->yCoordinate.data == NULL) || (spec->yCoordinate.len == 0)) { in CheckSm2CipherTextSpec() 78 if ((spec->hashData.data == NULL) || (spec->hashData.len == 0)) { in CheckSm2CipherTextSpec() 82 if ((spec->cipherTextData.data == NULL) || (spec->cipherTextData.len == 0)) { in CheckSm2CipherTextSpec() 86 if (spec->hashData.len != HCF_SM2_C3_LEN) { in CheckSm2CipherTextSpec() 93 HcfResult HcfGenCipherTextBySpec(Sm2CipherTextSpec *spec, const char *mode, HcfBlob *output) in HcfGenCipherTextBySpec() argument 103 if (!CheckSm2CipherTextSpec(spec)) { in HcfGenCipherTextBySpec() [all …]
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/framework_test/crypto_engine_test/src/ |
H A D | hks_openssl_rsa_test.cpp | 71 HksKeySpec spec = { variable 76 int32_t ret = RsaGenKeyCheckParam(&spec); 79 spec.keyLen = HKS_RSA_KEY_SIZE_1024; 80 ret = RsaGenKeyCheckParam(&spec); 83 spec.keyLen = HKS_RSA_KEY_SIZE_2048; 84 ret = RsaGenKeyCheckParam(&spec); 87 spec.keyLen = HKS_RSA_KEY_SIZE_3072; 88 ret = RsaGenKeyCheckParam(&spec); 91 spec.keyLen = HKS_RSA_KEY_SIZE_4096; 92 ret = RsaGenKeyCheckParam(&spec);
|
/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/ |
H A D | hks_openssl_sm3.c | 31 static int32_t Sm3GenKeyCheckParam(const struct HksKeySpec *spec) in Sm3GenKeyCheckParam() argument 33 if ((spec->keyLen == 0) || (spec->keyLen % BIT_NUM_OF_UINT8 != 0)) { in Sm3GenKeyCheckParam() 34 HKS_LOG_E("keyLen is wrong, len = %" LOG_PUBLIC "u", spec->keyLen); in Sm3GenKeyCheckParam() 40 int32_t HksOpensslSm3GenerateKey(const struct HksKeySpec *spec, struct HksBlob *key) in HksOpensslSm3GenerateKey() argument 42 HKS_IF_NOT_SUCC_LOGE_RETURN(Sm3GenKeyCheckParam(spec), in HksOpensslSm3GenerateKey() 44 return HksOpensslGenerateRandomKey(spec->keyLen, key); in HksOpensslSm3GenerateKey()
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/ |
H A D | cipher_aes_common.c | 28 HcfIvParamsSpec *spec = (HcfIvParamsSpec *)params; in GetIv() local 29 uint8_t *iv = spec->iv.data; in GetIv() 38 HcfIvParamsSpec *spec = (HcfIvParamsSpec *)params; in GetIvLen() local 39 return spec->iv.len; in GetIvLen() 47 HcfCcmParamsSpec *spec = (HcfCcmParamsSpec *)params; in GetCcmTagLen() local 48 size_t tagLen = spec->tag.len; in GetCcmTagLen() 57 HcfCcmParamsSpec *spec = (HcfCcmParamsSpec *)params; in GetCcmTag() local 58 uint8_t *tag = spec->tag.data; in GetCcmTag()
|
/ohos5.0/base/update/updater/services/ui/view/component/ |
H A D | text_label_adapter.cpp | 23 const UxLabelInfo &spec = std::get<UxLabelInfo>(info.specificInfo); in TextLabelAdapter() local 25 this->SetAlign(GetAlign(spec.align), OHOS::TEXT_ALIGNMENT_CENTER); in TextLabelAdapter() 26 this->SetText(TranslateText(spec.text).c_str()); in TextLabelAdapter() 27 this->SetFont(DEFAULT_FONT_FILENAME, spec.fontSize); in TextLabelAdapter() 28 this->SetStyle(OHOS::STYLE_LINE_HEIGHT, UPDATER_UI_FONT_HEIGHT_RATIO * spec.fontSize); in TextLabelAdapter() 29 auto fontColor = StrToColor(spec.fontColor); in TextLabelAdapter() 32 auto bgColor = StrToColor(spec.bgColor); in TextLabelAdapter()
|
/ohos5.0/drivers/peripheral/camera/test/ut/pipeline_core/ |
H A D | stream_pipeline_strategy_test.cpp | 61 std::shared_ptr<PipelineSpec> spec = s->GeneratePipelineSpec(0); variable 62 EXPECT_TRUE(spec != nullptr); 73 std::shared_ptr<PipelineSpec> spec = s->GeneratePipelineSpec(0); variable 74 EXPECT_TRUE(spec != nullptr); 88 std::shared_ptr<PipelineSpec> spec = s->GeneratePipelineSpec(0); variable 89 EXPECT_TRUE(spec != nullptr); 96 std::shared_ptr<PipelineSpec> spec = s->GeneratePipelineSpec(1); variable 97 EXPECT_TRUE(spec == nullptr);
|
/ohos5.0/base/security/crypto_framework/frameworks/cj/include/ |
H A D | crypto_ffi.h | 81 …FFI_EXPORT int32_t FfiOHOSCipherInitByGcm(int64_t id, int32_t opMode, void* key, CParamsSpec spec); 82 …FFI_EXPORT int32_t FfiOHOSCipherInitByCcm(int64_t id, int32_t opMode, void* key, CParamsSpec spec); 126 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByDsaCommonSpec(HcfDsaCommParamsSpec *spec, int32_t *errC… 127 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByDsaPubKeySpec(HcfDsaPubKeyParamsSpec *spec, int32_t *er… 129 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByEccCommonSpec(HcfEccCommParamsSpec *spec, int32_t *errC… 130 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByEccPriKeySpec(HcfEccPriKeyParamsSpec *spec, int32_t *er… 131 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByEccPubKeySpec(HcfEccPubKeyParamsSpec *spec, int32_t *er… 138 HcfAlg25519KeyPairParamsSpec *spec, int32_t *errCode); 139 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByDhPriKeySpec(HcfDhPriKeyParamsSpec *spec, int32_t *errC… 140 …FFI_EXPORT int64_t FFiOHOSAsyKeyGeneratorByDhPubKeySpec(HcfDhPubKeyParamsSpec *spec, int32_t *errC… [all …]
|