Home
last modified time | relevance | path

Searched refs:HcMalloc (Results 1 – 25 of 108) sorted by relevance

12345

/ohos5.0/base/security/device_auth/test/unittest/deviceauth/source/
H A Dkey_agree_sdk_test.cpp56 g_session = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase()
57 g_session_s = (KeyAgreeSession *)HcMalloc(sizeof(KeyAgreeSession), 0); in SetUpTestCase()
145 g_deviceId.data = (uint8_t *)HcMalloc(g_deviceId.length, 0); in SetUpTestCase()
149 g_deviceId_s.data = (uint8_t *)HcMalloc(g_deviceId_s.length, 0); in SetUpTestCase()
230 g_deviceId.data = (uint8_t *)HcMalloc(g_deviceId.length, 0); in SetUpTestCase()
234 g_deviceId_s.data = (uint8_t *)HcMalloc(g_deviceId_s.length, 0); in SetUpTestCase()
266 g_sessionKey.data = (uint8_t *)HcMalloc(g_sessionKey.length, 0); in SetUp()
638 g_sessionKey.data = (uint8_t *)HcMalloc(g_sessionKey.length, 0); in SetUpTestCase()
694 g_deviceId.data = (uint8_t *)HcMalloc(g_deviceId.length, 0); in SetUpTestCase()
698 g_deviceId_s.data = (uint8_t *)HcMalloc(g_deviceId_s.length, 0); in SetUpTestCase()
[all …]
H A Dmk_agree_test.cpp92 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
115 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
128 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
151 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
174 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
187 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
203 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
219 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
235 uint8_t *peerDevPkVal = static_cast<uint8_t *>(HcMalloc(peerDevPkLen, 0));
H A Ddevice_auth_ext_mock.c41 ExtPluginNode *node = (ExtPluginNode *)HcMalloc(sizeof(ExtPluginNode), 0); in CreateNode()
46 node->plugin = (ExtPlugin *)HcMalloc(sizeof(ExtPlugin), 0); in CreateNode()
91 extPart->instance = (ExtPart *)HcMalloc(sizeof(ExtPart), 0); in InitExtPart()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/lite_exchange_task/
H A Diso_server_bind_exchange_task.c83 encData = (uint8_t *)HcMalloc(ENC_CHALLENGE_LEN, 0); in DecryptChallenge()
89 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in DecryptChallenge()
120 uint8_t *keyAlias = (uint8_t *)HcMalloc(ISO_KEY_ALIAS_LEN, 0); in ImportAuthCode()
147 uint8_t *authCode = (uint8_t *)HcMalloc(AUTH_CODE_LEN, 0); in GenAndEncAuthCode()
194 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in GenerateAuthCodeAndImport()
199 encAuthCode = (uint8_t *)HcMalloc(AUTH_CODE_LEN + TAG_LEN, 0); in GenerateAuthCodeAndImport()
241 uint8_t *challenge = (uint8_t *)HcMalloc(CHALLENGE_SIZE, 0); in ServerBindExchangeStart()
265 …IsoServerBindExchangeTask *task = (IsoServerBindExchangeTask *)HcMalloc(sizeof(IsoServerBindExchan… in CreateServerBindExchangeTask()
H A Diso_client_bind_exchange_task.c45 uint8_t *keyAliasVal = (uint8_t *)HcMalloc(ISO_KEY_ALIAS_LEN, 0); in DecAndImportInner()
94 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in DecAndImportAuthCode()
99 encData = (uint8_t *)HcMalloc(encDataLen, 0); in DecAndImportAuthCode()
108 authCode = (uint8_t *)HcMalloc(AUTH_CODE_LEN, 0); in DecAndImportAuthCode()
171 *nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in ClientBindAesEncrypt()
182 *encData = (uint8_t *)HcMalloc(sizeof(task->challenge) + TAG_LEN, 0); in ClientBindAesEncrypt()
249 …IsoClientBindExchangeTask *task = (IsoClientBindExchangeTask *)HcMalloc(sizeof(IsoClientBindExchan… in CreateClientBindExchangeTask()
/ohos5.0/base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/
H A Dpake_v2_protocol_common.c75 params->salt.val = (uint8_t *)HcMalloc(params->salt.length, 0); in AllocDefaultParams()
96 params->kcfData.val = (uint8_t *)HcMalloc(params->kcfData.length, 0); in AllocDefaultParams()
215 idSelfMsg.val = (uint8_t *)HcMalloc(idSelfMsg.length, 0); in ComputeSidSelf()
247 idPeerMsg.val = (uint8_t *)HcMalloc(idPeerMsg.length, 0); in ComputeSidPeer()
281 sidSelf.val = (uint8_t *)HcMalloc(sidSelf.length, 0); in ComputeSid()
286 sidPeer.val = (uint8_t *)HcMalloc(sidPeer.length, 0); in ComputeSid()
336 sharedSecretMsg.val = (uint8_t *)HcMalloc(sharedSecretMsg.length, 0); in ComputeSharedSecret()
388 tmpSharedSecret.val = (uint8_t *)HcMalloc(tmpSharedSecret.length, 0); in GenerateSharedSecret()
406 sid.val = (uint8_t *)HcMalloc(sid.length, 0); in GenerateSharedSecret()
504 proofMsg.val = (uint8_t *)HcMalloc(proofMsg.length, 0); in GenerateProof()
[all …]
/ohos5.0/base/security/device_auth/services/identity_manager/src/
H A Didentity_pin.c24 ProtocolEntity *dlSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetDlSpekeProtocol()
46 ProtocolEntity *isoEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetIsoProtocol()
94 ProtocolEntity *ecSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetProtocolsForPinType()
121 ProtocolEntity *ecSpekeEntity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetProtocolsForDirectAuth()
281 uint8_t *seedVal = (uint8_t *)HcMalloc(SEED_LEN, 0); in GetSharedSecretForPinInIso()
293 uint8_t *pskVal = (uint8_t *)HcMalloc(ISO_PSK_LEN, 0); in GetSharedSecretForPinInIso()
322 sharedSecret->val = (uint8_t *)HcMalloc(pinLen, 0); in GetSharedSecretForPinInPake()
H A Dcert_operation.c36 ProtocolEntity *entity = (ProtocolEntity *)HcMalloc(sizeof(ProtocolEntity), 0); in SetProtocolsForUidType()
253 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in VerifyPeerCertInfo()
289 peerPkBuff->val = (uint8_t *)HcMalloc(pkSize, 0); in GetPeerPubKeyFromCert()
309 uint8_t *priAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GetSharedSecretForAccountInPake()
328 sharedSecret->val = (uint8_t *)HcMalloc(sharedKeyAliasLen, 0); in GetSharedSecretForAccountInPake()
353 certInfo->pkInfoStr.val = (uint8_t *)HcMalloc(pkInfoLen, 0); in GenerateCertInfo()
366 certInfo->pkInfoSignature.val = (uint8_t *)HcMalloc(signatureLen, 0); in GenerateCertInfo()
484 authToken->val = (uint8_t *)HcMalloc(AUTH_TOKEN_SIZE, 0); in GenerateAuthTokenForAccessory()
517 authTokenAlias->val = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GenerateTokenAliasForController()
679 uint8_t *aliasVal = (uint8_t *)HcMalloc(sharedKeyAliasLen, 0); in GetSharedSecretByPeerCertFromPlugin()
[all …]
H A Didentity_common.c34 sharedSecret->val = (uint8_t *)HcMalloc(len + 1, 0); in ConvertPsk()
53 preSharedUrl->val = (uint8_t *)HcMalloc(urlLen + 1, 0); in SetPreSharedUrlForProof()
144 IdentityInfo *info = (IdentityInfo *)HcMalloc(sizeof(IdentityInfo), 0); in CreateIdentityInfo()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_task_common/
H A Diso_task_common.c40 uint8_t *hkdfSalt = (uint8_t *)HcMalloc(hkdfSaltLen, 0); in GenerateReturnKey()
103 out = (uint8_t *)HcMalloc((sizeof(int) + TAG_LEN), 0); in GenerateEncResult()
147 returnSessionKey = (uint8_t *)HcMalloc(params->keyLen, 0); in SendResultToFinalSelf()
192 returnKey = (uint8_t *)HcMalloc(params->keyLen, 0); in GenEncResult()
226 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in CheckEncResult()
232 encResult = (uint8_t *)HcMalloc(sizeof(int) + TAG_LEN, 0); in CheckEncResult()
401 params->serviceType = (char *)HcMalloc((uint32_t)(HcStrlen(serviceType) + 1), 0); in FillPkgNameAndServiceType()
458 params->pinCodeString = (char *)HcMalloc(HcStrlen(pinString) + 1, 0); in FillPin()
474 params->seed.val = (uint8_t *)HcMalloc(SEED_LEN, 0); in AllocSeed()
662 uint8_t *random = (uint8_t *)HcMalloc(SEED_LEN, 0); in GenerateSeed()
[all …]
/ohos5.0/base/security/device_auth/services/protocol/src/pake_protocol/pake_v1_protocol/
H A Dpake_v1_protocol_common.c71 params->salt.val = (uint8_t *)HcMalloc(params->salt.length, 0); in AllocDefaultParams()
78 params->challengeSelf.val = (uint8_t *)HcMalloc(params->challengeSelf.length, 0); in AllocDefaultParams()
85 params->challengePeer.val = (uint8_t *)HcMalloc(params->challengePeer.length, 0); in AllocDefaultParams()
92 params->sessionKey.val = (uint8_t *)HcMalloc(params->sessionKey.length, 0); in AllocDefaultParams()
99 params->hmacKey.val = (uint8_t *)HcMalloc(params->hmacKey.length, 0); in AllocDefaultParams()
106 params->kcfData.val = (uint8_t *)HcMalloc(params->kcfData.length, 0); in AllocDefaultParams()
113 params->kcfDataPeer.val = (uint8_t *)HcMalloc(params->kcfDataPeer.length, 0); in AllocDefaultParams()
230 unionKey.val = (uint8_t *)HcMalloc(unionKey.length, 0); in DeriveKeyFromSharedSecret()
/ohos5.0/base/security/device_auth/common_lib/impl/src/
H A Duint8buff_utils.c31 buff->val = (uint8_t *)HcMalloc(buffLen, 0); in InitUint8Buff()
47 uint8_t *val = (uint8_t *)HcMalloc(buff->length, 0); in DeepCopyUint8Buff()
86 char *buffStr = (char *)HcMalloc(buffLen + 1, 0); in ToLowerCase()
H A Dstring_util.c103 *desStr = HcMalloc(len + 1, 0); in ToUpperCase()
126 char *val = (char *)HcMalloc(len + 1, 0); in DeepCopyString()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/common/
H A Ddas_task_common.c172 serviceIdPlain.val = (uint8_t *)HcMalloc(serviceIdPlain.length, 0); in CombineServiceId()
207 keyAliasBuff.val = (uint8_t *)HcMalloc(keyAliasBuff.length, 0); in CombineKeyAlias()
250 keyAliasBuff.val = (uint8_t *)HcMalloc(keyAliasBuff.length, 0); in CombineKeyAliasForPseudonymPsk()
313 keyAliasHash.val = (uint8_t *)HcMalloc(keyAliasHash.length, 0); in CombineKeyAliasForPake()
325 outKeyAliasHex = (char *)HcMalloc(outKeyAliasHexLen, 0); in CombineKeyAliasForPake()
370 serviceId.val = (uint8_t *)HcMalloc(serviceId.length, 0); in GenerateKeyAlias()
427 keyAliasHash.val = (uint8_t *)HcMalloc(keyAliasHash.length, 0); in GeneratePseudonymPskAlias()
440 char *outKeyAliasHex = (char *)HcMalloc(outKeyAliasHexLen, 0); in GeneratePseudonymPskAlias()
509 uint8_t *authIdPeerTmp = (uint8_t *)HcMalloc(authIdPeerLen, 0); in GetAndCheckAuthIdPeer()
/ohos5.0/base/security/device_auth/deps_adapter/os_adapter/interfaces/
H A Dhc_types.h39 #define HcMalloc(size, val) MockMalloc(size, val, __FILE__, __LINE__) macro
46 void* HcMalloc(uint32_t size, char val);
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/iso_auth_task/
H A Diso_auth_task_common.c48 params->userIdSelf = (char *)HcMalloc(DEV_AUTH_USER_ID_SIZE, 0); in FillUserId()
53 params->userIdPeer = (char *)HcMalloc(DEV_AUTH_USER_ID_SIZE, 0); in FillUserId()
94 params->deviceIdSelf = (char *)HcMalloc(selfDeviceIdLen + 1, 0); in FillPayload()
126 params->challenge.val = (uint8_t *)HcMalloc(params->challenge.length, 0); in SetChallenge()
302 params->devIdPeer.val = (uint8_t *)HcMalloc(devIdPeerHexLen / BYTE_TO_HEX_OPER_LENGTH + 1, 0); in GetPayloadValue()
318 params->deviceIdPeer = (char *)HcMalloc(deviceIdPeerLen + 1, 0); in GetPayloadValue()
364 char *combineString = (char *)HcMalloc(len, 0); in ExtractAndVerifyPayload()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/creds_manager/
H A Dasy_token_manager.c228 char *fileData = (char *)HcMalloc(fileSize, 0); in ReadTokensFromFile()
359 uint8_t *aliasStr = (uint8_t *)HcMalloc(aliasStrLen, 0); in GenerateKeyAlias()
460 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in DoImportServerPkAndVerify()
504 uint8_t *signature = (uint8_t *)HcMalloc(SIGNATURE_SIZE, 0); in VerifySignature()
514 uint8_t *serverPk = (uint8_t *)HcMalloc(SERVER_PK_SIZE, 0); in VerifySignature()
672 uint8_t *publicKeyVal = (uint8_t *)HcMalloc(PK_SIZE, 0); in DoExportPkAndCompare()
716 uint8_t *devicePk = (uint8_t *)HcMalloc(PK_SIZE, 0); in CheckDevicePk()
726 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in CheckDevicePk()
841 uint8_t *keyAliasValue = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GetRegisterProof()
850 uint8_t *publicKeyVal = (uint8_t *)HcMalloc(PK_SIZE, 0); in GetRegisterProof()
[all …]
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/
H A Dpake_task_common.c153 params->baseParams.idSelf.val = (uint8_t *)HcMalloc(params->baseParams.idSelf.length, 0); in FillAuthId()
175 params->baseParams.idPeer.val = (uint8_t *)HcMalloc(params->baseParams.idPeer.length, 0); in FillAuthId()
211 params->packageName = (char *)HcMalloc(HcStrlen(packageName) + 1, 0); in FillPkgNameAndServiceType()
226 params->serviceType = (char *)HcMalloc(HcStrlen(serviceType) + 1, 0); in FillPkgNameAndServiceType()
243 params->nonce.val = (uint8_t *)HcMalloc(params->nonce.length, 0); in FillNonce()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_protocol_task/
H A Diso_server_protocol_task.c83 uint8_t *selfToken = (uint8_t *)HcMalloc(ISO_TOKEN_LEN, 0); in IsoServerStart()
173 peerToken = (uint8_t *)HcMalloc(ISO_TOKEN_LEN, 0); in CalTokenAndGenSessionKey()
182 tokenSelf = (uint8_t *)HcMalloc(ISO_TOKEN_LEN, 0); in CalTokenAndGenSessionKey()
244 … IsoProtocolServerTask *task = (IsoProtocolServerTask *)HcMalloc(sizeof(IsoProtocolServerTask), 0); in CreateProtocolServerTask()
/ohos5.0/base/security/device_auth/services/protocol/src/iso_protocol/
H A Diso_protocol_common.c37 params->randSelf.val = (uint8_t *)HcMalloc(params->randSelf.length, 0); in InitIsoBaseParams()
44 params->randPeer.val = (uint8_t *)HcMalloc(params->randPeer.length, 0); in InitIsoBaseParams()
52 params->sessionKey.val = (uint8_t *)HcMalloc(params->sessionKey.length, 0); in InitIsoBaseParams()
98 uint8_t *messagePeer = (uint8_t *)HcMalloc(length, 0); in IsoCalSelfToken()
144 uint8_t *messageSelf = (uint8_t *)HcMalloc(length, 0); in IsoCalPeerToken()
216 uint8_t *hkdfSalt = (uint8_t *)HcMalloc(hkdfSaltLen, 0); in IsoGenSessionKey()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_related/auth/pake_v2_auth_task/
H A Dpake_v2_auth_task_common.c58 uint8_t *serverPkAlias = (uint8_t *)HcMalloc(SHA256_LEN, 0); in VerifyPkSignPeer()
95 uint8_t *priAliasVal = (uint8_t *)HcMalloc(SHA256_LEN, 0); in GenerateEcdhSharedKey()
111 params->pakeParams.psk.val = (uint8_t *)HcMalloc(sharedKeyAliasLen, 0); in GenerateEcdhSharedKey()
196 params->deviceIdSelf.val = (uint8_t *)HcMalloc(params->deviceIdSelf.length + 1, 0); in ExtractSelfDeviceId()
250 params->devIdSelf.val = (uint8_t *)HcMalloc(params->devIdSelf.length + 1, 0); in ExtractSelfDevId()
277 params->pkPeerBuff.val = (uint8_t *)HcMalloc(pkSize, 0); in GetPeerPkFromPkInfo()
/ohos5.0/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/
H A Dhuks_adapter.c274 struct HksParam *checkParams = (struct HksParam *)HcMalloc(sizeof(struct HksParam) * len, 0); in ConstructCheckParamSet()
401 struct HksParam *hmacParams = (struct HksParam *)HcMalloc(sizeof(struct HksParam) * len, 0); in ConstructHmacParamSet()
629 struct HksParam *hkdfParams = (struct HksParam *)HcMalloc(sizeof(struct HksParam) * len, 0); in ConstructHkdfParamSet()
721 struct HksParam *hkdfParams = (struct HksParam *)HcMalloc(sizeof(struct HksParam) * len, 0); in ConstructPseudonymParamSet()
830 uint8_t *blobVal = (uint8_t *)HcMalloc(outParamSetSize, 0); in ConstructOutParamSet()
871 uint8_t *tmpExtInfoVal = (uint8_t *)HcMalloc(extInfoParam->blob.size, 0); in GetExtInfoByParamSet()
892 struct HksParam *getParams = (struct HksParam *)HcMalloc(sizeof(struct HksParam) * len, 0); in ConstructGetKeyExtInfoParamSet()
1480 bigNumBlob.data = (uint8_t *)HcMalloc(bigNumBlob.size, 0); in BigNumExpMod()
1668 outParamSet = (struct HksParamSet *)HcMalloc(outParamSetSize, 0); in GenerateKeyPair()
2105 uint8_t *primeByte = (uint8_t *)HcMalloc(innerKeyLen, 0); in CheckDlPublicKey()
[all …]
/ohos5.0/base/security/device_auth/services/legacy/group_manager/src/callback_manager/
H A Dcallback_manager.c60 char *copyAppId = (char *)HcMalloc(appIdLen, 0); in AddCallbackIfNotExist()
70 … DeviceAuthCallback *copyCallback = (DeviceAuthCallback *)HcMalloc(sizeof(DeviceAuthCallback), 0); in AddCallbackIfNotExist()
215 g_callbackMutex = (HcMutex *)HcMalloc(sizeof(HcMutex), 0); in InitCallbackManager()
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/standard_exchange_task/
H A Dcommon_standard_bind_exchange.c33 params->pubKeyPeer.val = (uint8_t *)HcMalloc(params->pubKeyPeer.length, 0); in InitStandardBindExchangeParams()
40 params->pubKeySelf.val = (uint8_t *)HcMalloc(params->pubKeySelf.length, 0); in InitStandardBindExchangeParams()
47 params->nonce.val = (uint8_t *)HcMalloc(params->nonce.length, 0); in InitStandardBindExchangeParams()
173 uint8_t *msgInfoVal = (uint8_t *)HcMalloc(msgInfoLen, 0); in GenerateSignInfo()
224 uint8_t *exchangeInfoVal = (uint8_t *)HcMalloc(exchangeInfoLen, 0); in EncryptAuthAndSignInfo()
281 uint8_t *exchangeInfoVal = (uint8_t *)HcMalloc(exchangeInfoLen, 0); in DecryptAuthAndSignInfo()
358 uint8_t *verifyMsgVal = (uint8_t *)HcMalloc(verifyMsgLen, 0); in VerifySignInfo()
/ohos5.0/base/security/device_auth/services/frameworks/src/plugin_adapter/ext_part/
H A Daccount_lifecycle_plugin_proxy.c76 WorkerTask *baseTask = (WorkerTask *)HcMalloc(sizeof(WorkerTask), 0); in ExecuteWorkerTask()
97 … g_accountPluginCtx = (AccountLifecyleExtPlugCtx *)HcMalloc(sizeof(AccountLifecyleExtPlugCtx), 0); in InitAccountLifecyclePluginCtx()

12345