Home
last modified time | relevance | path

Searched refs:mac (Results 1 – 25 of 66) sorted by relevance

123

/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_mbedtls_hmac.c88 uint32_t digestAlg, const struct HksBlob *msg, struct HksBlob *mac) in HksMbedtlsHmac() argument
96 key->data, key->size, msg->data, msg->size, mac->data); in HksMbedtlsHmac()
102 (void)memset_s(mac->data, mac->size, 0, mac->size); in HksMbedtlsHmac()
106 ret = HksGetDigestLen(digestAlg, &(mac->size)); in HksMbedtlsHmac()
109 (void)memset_s(mac->data, mac->size, 0, mac->size); in HksMbedtlsHmac()
177 int32_t HksMbedtlsHmacFinal(void **cryptoCtx, struct HksBlob *msg, struct HksBlob *mac) in HksMbedtlsHmacFinal() argument
196 ret = mbedtls_md_hmac_finish(hmacCtx, mac->data); in HksMbedtlsHmacFinal()
199 (void)memset_s(mac->data, mac->size, 0, mac->size); in HksMbedtlsHmacFinal()
204 ret = HksGetDigestLen(hctx->digestAlg, &(mac->size)); in HksMbedtlsHmacFinal()
Dhks_mbedtls_engine.c41 struct HksBlob *mac) in HksCryptoHalHmac() argument
43 …if (CheckBlob(key) != HKS_SUCCESS || CheckBlob(msg) != HKS_SUCCESS || CheckBlob(mac) != HKS_SUCCES… in HksCryptoHalHmac()
49 return func(key, digestAlg, msg, mac); in HksCryptoHalHmac()
78 int32_t HksCryptoHalHmacFinal(const struct HksBlob *msg, void **ctx, struct HksBlob *mac) in HksCryptoHalHmacFinal() argument
80 if (msg == NULL || ctx == NULL || *ctx == NULL || CheckBlob(mac) != HKS_SUCCESS) { in HksCryptoHalHmacFinal()
88 return func(ctx, msg, mac); in HksCryptoHalHmacFinal()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_hmac.c43 …_t HmacCheckBuffer(const struct HksBlob *key, const struct HksBlob *msg, const struct HksBlob *mac) in HmacCheckBuffer() argument
47 HKS_IF_NOT_SUCC_LOGE_RETURN(HksOpensslCheckBlob(mac), HKS_ERROR_INVALID_ARGUMENT, "Invalid mac") in HmacCheckBuffer()
71 const struct HksBlob *key, uint32_t alg, const struct HksBlob *msg, const struct HksBlob *mac) in HmacCheckParam() argument
73 …HKS_IF_NOT_SUCC_LOGE_RETURN(HmacCheckBuffer(key, msg, mac), HKS_ERROR_INVALID_ARGUMENT, "Invalid B… in HmacCheckParam()
85 if (mac->size < digestLen) { in HmacCheckParam()
86 …HKS_LOG_E("invalid mac->size(0x%" LOG_PUBLIC "x) for digestLen(0x%" LOG_PUBLIC "x)", mac->size, di… in HmacCheckParam()
94 …Hmac(const struct HksBlob *key, uint32_t digestAlg, const struct HksBlob *msg, struct HksBlob *mac) in HksOpensslHmac() argument
96 HKS_IF_NOT_SUCC_RETURN(HmacCheckParam(key, digestAlg, msg, mac), HKS_ERROR_INVALID_ARGUMENT) in HksOpensslHmac()
107 …ata = HMAC(opensslAlg, key->data, (int32_t)key->size, msg->data, msg->size, mac->data, &mac->size); in HksOpensslHmac()
179 int32_t HksOpensslHmacFinal(void **cryptoCtx, struct HksBlob *msg, struct HksBlob *mac) in HksOpensslHmacFinal() argument
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_hmac_helper.c62 …Hmac(const struct HksBlob *key, uint32_t digestAlg, const struct HksBlob *msg, struct HksBlob *mac) in HmacHmac() argument
68 …if (HMAC(getDigestAlg, key->data, (int32_t)key->size, msg->data, msg->size, mac->data, &mac->size)… in HmacHmac()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_auth_mgr.c146 uri.mac = NULL; in ConstructToBeAuthedUri()
166 uri.mac = NULL; in ConstructMacKeyUri()
179 uri.mac = NULL; in ConstructCommonUri()
183 static int32_t CalcUriMac(const struct CMUri *uriObj, uint32_t clientUid, struct CmBlob *mac, bool … in CalcUriMac() argument
212 ret = CmKeyOpCalcMac(&macKeyUri, &toBeAuthedUri, mac); in CalcUriMac()
251 … int32_t ConstructAuthUri(const struct CMUri *uriObj, uint32_t clientUid, const struct CmBlob *mac, in ConstructAuthUri() argument
264 uint32_t macHexLen = mac->size * BYTE_TO_HEX_OPER_LENGTH + 1; in ConstructAuthUri()
271 ret = ByteToHexString(mac->data, mac->size, macHex, macHexLen); in ConstructAuthUri()
280 uri.mac = macHex; in ConstructAuthUri()
294 struct CmBlob mac = { sizeof(macData), macData }; in GenerateAuthUri() local
[all …]
/base/security/huks/test/unittest/huks_lite_test/common/
Dhks_test_api_performance.c85 const struct HksBlob *srcData, struct HksBlob *mac, uint32_t performTimes) in HksMacRun() argument
88 if (mac != NULL) { in HksMacRun()
89 oriMacSize = mac->size; in HksMacRun()
93 if (mac != NULL) { in HksMacRun()
94 (void)memset_s(mac->data, oriMacSize, 0, oriMacSize); in HksMacRun()
95 mac->size = oriMacSize; in HksMacRun()
97 int32_t ret = HksMac(key, paramSet, srcData, mac); in HksMacRun()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/include/
Dhks_mbedtls_hmac.h37 uint32_t digestAlg, const struct HksBlob *msg, struct HksBlob *mac);
43 int32_t HksMbedtlsHmacFinal(void **cryptoCtx, struct HksBlob *msg, struct HksBlob *mac);
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/
Dhks_test_api_performance.c87 const struct HksBlob *srcData, struct HksBlob *mac, uint32_t performTimes) in HksMacRun() argument
91 if (mac != NULL) { in HksMacRun()
92 oriMacSize = mac->size; in HksMacRun()
96 if (mac != NULL) { in HksMacRun()
97 (void)memset_s(mac->data, oriMacSize, 0, oriMacSize); in HksMacRun()
98 mac->size = oriMacSize; in HksMacRun()
100 ret = HksMac(key, paramSet, srcData, mac); in HksMacRun()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/include/
Dhks_openssl_hmac.h42 …mac(const struct HksBlob *key, uint32_t digestAlg, const struct HksBlob *msg, struct HksBlob *mac);
48 int32_t HksOpensslHmacFinal(void **cryptoCtx, struct HksBlob *msg, struct HksBlob *mac);
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/
Dhks_chipset_platform_test.h32 std::vector<uint8_t> mac {};
60 { .tag = HKS_TAG_AE_TAG, .blob = { .size = t.mac.size(), .data = t.mac.data() } }, in CipherMaterialsToDecryptInputParams()
/base/security/crypto_framework/frameworks/js/napi/crypto/src/
Dnapi_mac.cpp46 HcfMac *mac = nullptr; member
78 context->mac = nullptr; in FreeCryptoFwkCtx()
113 HcfMac *macObj = context->mac; in MacInitExecute()
138 HcfMac *macObj = context->mac; in MacUpdateExecute()
163 HcfMac *macObj = context->mac; in MacDoFinalExecute()
224 context->mac = napiMac->GetMac(); in BuildMacJsInitCtx()
259 context->mac = napiMac->GetMac(); in BuildMacJsUpdateCtx()
289 context->mac = napiMac->GetMac(); in BuildMacJsDoFinalCtx()
454 HcfMac *mac = napiMac->GetMac(); in JsGetMacLength() local
455 if (mac == nullptr) { in JsGetMacLength()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_chipset_platform_decrypt_test.cpp60 .mac = {
90 .mac = {
120 .mac = {
150 .mac = {
182 .mac = {
274 .mac = {
304 .mac = {
334 .mac = {
364 .mac = {
396 .mac = {
[all …]
/base/security/huks/test/unittest/huks_standard_test/module_test/mock/idl/src/
Dhuks_access_mock.c146 const struct HksBlob *srcData, struct HksBlob *mac)) in ENABLE_CFI() argument
148 return HksCoreMac(key, paramSet, srcData, mac); in ENABLE_CFI()
161 const struct HksBlob *srcData, struct HksBlob *mac)) in ENABLE_CFI() argument
163 return HksCoreCalcMacHeader(paramSet, salt, srcData, mac); in ENABLE_CFI()
/base/hiviewdfx/hilog/frameworks/libhilog/
DBUILD.gn45 if (platform != "windows" && platform != "mac" && platform != "linux") {
73 if (platform != "windows" && platform != "mac" && platform != "linux") {
85 } else if (platform == "mac") {
106 if (platform != "windows" && platform != "mac" && platform != "linux") {
/base/security/huks/services/huks_standard/huks_service/main/core/include/
Dhuks_access.h62 const struct HksBlob *srcData, struct HksBlob *mac);
70 const struct HksBlob *srcData, struct HksBlob *mac);
93 const struct HksBlob *srcData, struct HksBlob *mac);
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_interfaces.c151 const struct HksBlob *srcData, struct HksBlob *mac) in HuksHdiMac() argument
153 return HksCoreMac(key, paramSet, srcData, mac); in HuksHdiMac()
164 const struct HksBlob *srcData, struct HksBlob *mac) in HuksHdiCalcMacHeader() argument
166 return HksCoreCalcMacHeader(paramSet, salt, srcData, mac); in HuksHdiCalcMacHeader()
Dhks_sm_import_wrap_key.c382 struct HksBlob mac = { 0, NULL }; in CompareWrapKeyHmac() local
383 mac.size = originKeyEncMac.size; in CompareWrapKeyHmac()
384 mac.data = (uint8_t *)HksMalloc(mac.size); in CompareWrapKeyHmac()
385 HKS_IF_NULL_LOGE_RETURN(mac.data, HKS_ERROR_MALLOC_FAIL, "malloc mac memory failed!"); in CompareWrapKeyHmac()
387 ret = HksCryptoHalHmac(&dataParams->deriveKekData2, HKS_DIGEST_SM3, kEncData, &mac); in CompareWrapKeyHmac()
389 ret = HksMemCmp(originKeyEncMac.data, mac.data, mac.size); in CompareWrapKeyHmac()
392 HKS_FREE_PTR(mac.data); in CompareWrapKeyHmac()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/include/
Dopenssl_hmac_helper.h34 …mac(const struct HksBlob *key, uint32_t digestAlg, const struct HksBlob *msg, struct HksBlob *mac);
/base/location/interfaces/inner_api/include/
Dbluetooth_scan_info.h50 inline void SetMac(std::string mac) in SetMac() argument
52 mac_ = mac; in SetMac()
/base/security/crypto_framework/frameworks/crypto_operation/
Dmac.c153 HcfResult HcfMacCreate(const char *algoName, HcfMac **mac) in HcfMacCreate() argument
155 if (!IsStrValid(algoName, HCF_MAX_ALGO_NAME_LEN) || (mac == NULL)) { in HcfMacCreate()
189 *mac = (HcfMac *)returnMacApi; in HcfMacCreate()
/base/print/print_fwk/services/src/
Dprint_security_guard_info.cpp42 printTypeInfo_.mac = PrintUtil::SplitStr(printerId, '/', SPLIT_INDEX); in setPrintTypeInfo()
75 printTypeInfoJson["mac"] = printTypeInfo_.mac; in ToJson()
/base/security/crypto_framework/interfaces/innerkits/crypto_operation/
Dmac.h45 HcfResult HcfMacCreate(const char *algoName, HcfMac **mac);
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/
Dhks_ca_access.c96 const struct HksBlob *srcData, struct HksBlob *mac) in HksAccessMac() argument
98 return HksTeeMac(key, paramSet, srcData, mac); in HksAccessMac()
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/passthrough/
Dhuks_access.c248 const struct HksBlob *srcData, struct HksBlob *mac)) in ENABLE_CFI() argument
255 return g_hksHalDevicePtr->HuksHdiMac(key, paramSet, srcData, mac); in ENABLE_CFI()
273 const struct HksBlob *srcData, struct HksBlob *mac)) in ENABLE_CFI() argument
280 return g_hksHalDevicePtr->HuksHdiCalcMacHeader(paramSet, salt, srcData, mac); in ENABLE_CFI()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/
Dcert_manager_key_operation.h45 int32_t CmKeyOpCalcMac(const struct CmBlob *alias, const struct CmBlob *srcData, struct CmBlob *mac

123