Home
last modified time | relevance | path

Searched refs:templateId (Results 1 - 25 of 42) sorted by relevance

12

/drivers/peripheral/pin_auth/hdi_service/database/inc/
H A Dpin_db.h43 ResultCode AddPin(PinEnrollParam *pinEnrollParam, uint64_t *templateId, Buffer *outRootSecret);
44 ResultCode DoGetAlgoParameter(uint64_t templateId, uint8_t *salt, uint32_t *saltLen, uint32_t *algoVersion);
47 ResultCode DelPinById(uint64_t templateId);
48 ResultCode AuthPinById(const Buffer *inputPinData, uint64_t templateId, Buffer *outRootSecret, ResultCode *compareRet);
49 ResultCode ComputeFreezeTime(uint64_t templateId, uint32_t *freezeTime, uint32_t count, uint64_t startFreezeTime);
50 ResultCode GetRemainTimes(uint64_t templateId, uint32_t *remainingAuthTimes, uint32_t authErrorCount);
51 ResultCode GetSubType(uint64_t templateId, uint64_t *subType);
52 ResultCode GetAntiBruteInfo(uint64_t templateId, uint32_t *authErrorCount, uint64_t *startFreezeTime);
53 ResultCode RefreshAntiBruteInfoToFile(uint64_t templateId);
H A Dpin_db_ops_base.h37 ResultCode GenerateFileName(uint64_t templateId, const char *prefix, const char *suffix,
39 ResultCode ReadPinFile(uint8_t *data, uint32_t dataLen, uint64_t templateId, const char *suffix);
40 ResultCode WritePinFile(const uint8_t *data, uint32_t dataLen, uint64_t templateId, const char *suffix);
H A Dpin_db_ops_v1.h32 uint64_t templateId; member
H A Dpin_db_ops_v0.h30 uint64_t templateId; member
/drivers/peripheral/pin_auth/hdi_service/database/src/
H A Dpin_db.c113 static ResultCode RemovePinFile(const uint64_t templateId, const char *suffix, bool needCover) in RemovePinFile() argument
121 ResultCode ret = GenerateFileName(templateId, DEFAULT_FILE_HEAD, suffix, fileName, MAX_FILE_NAME_LEN); in RemovePinFile()
144 static ResultCode RemoveAllFile(uint64_t templateId) in RemoveAllFile() argument
147 ResultCode ret = RemovePinFile(templateId, ANTI_BRUTE_SUFFIX, false); in RemoveAllFile()
151 ret = RemovePinFile(templateId, CRYPTO_SUFFIX, true); in RemoveAllFile()
155 ret = RemovePinFile(templateId, SALT_SUFFIX, true); in RemoveAllFile()
159 ret = RemovePinFile(templateId, SECRET_SUFFIX, true); in RemoveAllFile()
171 uint64_t templateId = INVALID_TEMPLATE_ID; in GeneratePinTemplateId() local
172 SecureRandom((uint8_t *)&templateId, sizeof(templateId)); in GeneratePinTemplateId()
190 DelPin(uint64_t templateId) DelPin() argument
242 SearchPinIndex(uint64_t templateId, uint32_t *index) SearchPinIndex() argument
264 DelPinById(uint64_t templateId) DelPinById() argument
288 InitPinInfo(PinInfoV1 *pinInfo, uint64_t templateId, uint64_t subType) InitPinInfo() argument
301 InitPinIndex(PinIndexV1 *pinIndex, uint64_t templateId, uint64_t subType) InitPinIndex() argument
307 AddPinInDb(uint64_t templateId, uint64_t subType) AddPinInDb() argument
345 WriteAddPinInfo(const Buffer *secret, const Buffer *pinCredentialData, uint8_t *salt, uint32_t saltLen, const uint64_t templateId) WriteAddPinInfo() argument
548 ProcessAddPin(const Buffer *deviceKey, const Buffer *secret, PinEnrollParam *pinEnrollParam, uint64_t *templateId) ProcessAddPin() argument
588 AddPin(PinEnrollParam *pinEnrollParam, uint64_t *templateId, Buffer *outRootSecret) AddPin() argument
631 DoGetAlgoParameter(uint64_t templateId, uint8_t *salt, uint32_t *saltLen, uint32_t *algoVersion) DoGetAlgoParameter() argument
659 GetAntiBruteCountById(uint64_t templateId, uint32_t *count) GetAntiBruteCountById() argument
670 RefreshAntiBruteInfoToFile(uint64_t templateId) RefreshAntiBruteInfoToFile() argument
690 SetAntiBruteInfoById(uint64_t templateId, uint32_t count, uint64_t startFreezeTime) SetAntiBruteInfoById() argument
708 GetSubType(uint64_t templateId, uint64_t *subType) GetSubType() argument
730 GetAntiBruteInfo(uint64_t templateId, uint32_t *authErrorCount, uint64_t *startFreezeTime) GetAntiBruteInfo() argument
813 ComputeFreezeTime(uint64_t templateId, uint32_t *freezeTime, uint32_t count, uint64_t startFreezeTime) ComputeFreezeTime() argument
856 GetRemainTimes(uint64_t templateId, uint32_t *remainingAuthTimes, uint32_t authErrorCount) GetRemainTimes() argument
870 ClearAntiBruteInfoById(uint64_t templateId) ClearAntiBruteInfoById() argument
881 UpdateAntiBruteFile(uint64_t templateId, bool authResultSucc) UpdateAntiBruteFile() argument
943 ProcessAuthPin( const Buffer *storeData, const Buffer *inputData, uint64_t templateId, Buffer *outRootSecret) ProcessAuthPin() argument
989 AuthPinById(const Buffer *inputPinData, uint64_t templateId, Buffer *outRootSecret, ResultCode *compareRet) AuthPinById() argument
[all...]
H A Dpin_db_ops_base.c61 ResultCode GenerateFileName(uint64_t templateId, const char *prefix, const char *suffix, in GenerateFileName() argument
79 if (snprintf_s(templateIdStr, MAX_UINT64_LEN, MAX_UINT64_LEN - 1, "%" PRIu64, templateId) < 0) { in GenerateFileName()
102 ResultCode ReadPinFile(uint8_t *data, uint32_t dataLen, uint64_t templateId, const char *suffix) in ReadPinFile() argument
115 ResultCode ret = GenerateFileName(templateId, DEFAULT_FILE_HEAD, suffix, fileName, MAX_FILE_NAME_LEN); in ReadPinFile()
130 ResultCode WritePinFile(const uint8_t *data, uint32_t dataLen, uint64_t templateId, const char *suffix) in WritePinFile() argument
143 ResultCode ret = GenerateFileName(templateId, DEFAULT_FILE_HEAD, suffix, fileName, MAX_FILE_NAME_LEN); in WritePinFile()
H A Dpin_db_ops_v0.c61 pinDbV0->pinIndex[i].pinInfo.templateId, ANTI_BRUTE_SUFFIX) != RESULT_SUCCESS) { in GetPinIndexV0()
66 pinDbV0->pinIndex[i].pinInfo.templateId, ANTI_BRUTE_SUFFIX); in GetPinIndexV0()
H A Dpin_db_ops_v1.c61 pinDbV1->pinIndex[i].pinInfo.templateId = pinDbV0->pinIndex[i].pinInfo.templateId; in UpdatePinDbFrom0To1()
92 pinDbV1->pinIndex[i].pinInfo.templateId, ANTI_BRUTE_SUFFIX) != RESULT_SUCCESS) { in GetPinIndexV1()
97 pinDbV1->pinIndex[i].pinInfo.templateId, ANTI_BRUTE_SUFFIX); in GetPinIndexV1()
/drivers/peripheral/pin_auth/test/unittest/pin_auth/database/src/
H A Dpin_db_test.cpp61 uint64_t templateId = 0; in HWTEST_F() local
63 uint32_t result = AddPin(pinEnrollParam, &templateId, outRootSecret); in HWTEST_F()
79 result = AuthPinById(pinData, templateId, outRootSecret, &compareRet); in HWTEST_F()
86 result = AuthPinById(pinData, templateId, nullptr, &compareRet); in HWTEST_F()
89 result = AuthPinById(pinData, templateId, outRootSecret, nullptr); in HWTEST_F()
92 result = AuthPinById(pinData, templateId, outRootSecret, &compareRet); in HWTEST_F()
97 result = AuthPinById(pinData, templateId, outRootSecret, &compareRet); in HWTEST_F()
101 result = DelPinById(templateId); in HWTEST_F()
125 uint64_t templateId = 0; in HWTEST_F() local
128 uint32_t result = AddPin(pinEnrollParam, &templateId, outRootSecre in HWTEST_F()
174 uint64_t templateId = 0; HWTEST_F() local
217 uint64_t templateId = 0; HWTEST_F() local
257 uint64_t templateId = 0; HWTEST_F() local
297 uint64_t templateId = 0; HWTEST_F() local
[all...]
H A Dpin_db_ops_base_test.cpp112 uint64_t templateId = 0; in HWTEST_F() local
117 ResultCode result = GenerateFileName(templateId, nullptr, suffix, fileName, fileNameLen); in HWTEST_F()
120 result = GenerateFileName(templateId, prefix, nullptr, fileName, fileNameLen); in HWTEST_F()
123 result = GenerateFileName(templateId, prefix, suffix, nullptr, fileNameLen); in HWTEST_F()
126 result = GenerateFileName(templateId, prefix, suffix, fileName, fileNameLen); in HWTEST_F()
H A Dpin_db_ops_v1_test.cpp79 pinDbV0->pinIndex[0].pinInfo.templateId = 123; in HWTEST_F()
92 EXPECT_EQ(pinDbV1->pinIndex[0].pinInfo.templateId, pinDbV0->pinIndex[0].pinInfo.templateId); in HWTEST_F()
117 pinDbV1->pinIndex[0].pinInfo.templateId = 123; in HWTEST_F()
/drivers/peripheral/pin_auth/hdi_service/main/src/
H A Dall_in_one_func.c26 Buffer *retTlv, int32_t resultCode, uint64_t scheduleId, uint64_t templateId, Buffer *rootSecret) in GenerateResultTlv()
32 if (!SetResultDataInfo(attribute, PinResultToFwkResult(resultCode), templateId, rootSecret)) { in GenerateResultTlv()
56 uint64_t templateId = INVALID_TEMPLATE_ID; in DoEnrollPin() local
62 ResultCode ret = AddPin(pinEnrollParam, &templateId, rootSecret); in DoEnrollPin()
69 ret = GenerateResultTlv(retTlv, RESULT_SUCCESS, pinEnrollParam->scheduleId, templateId, rootSecret); in DoEnrollPin()
78 ResultCode DoAllInOneAuth(uint64_t scheduleId, uint64_t templateId, in DoAllInOneAuth() argument
87 ResultCode result = GetSubType(templateId, &(algoParam->subType)); in DoAllInOneAuth()
93 result = DoGetAlgoParameter(templateId, algoParam->algoParameter, &algoParameterSize, &(algoParam->algoVersion)); in DoAllInOneAuth()
109 ResultCode ret = DoQueryPinInfo(pinAuthParam->templateId, &pinCredentialInfo); in DoAuthPin()
122 ret = AuthPinById(&pinData, pinAuthParam->templateId, rootSecre in DoAuthPin()
25 GenerateResultTlv( Buffer *retTlv, int32_t resultCode, uint64_t scheduleId, uint64_t templateId, Buffer *rootSecret) GenerateResultTlv() argument
142 DoDeleteTemplate(uint64_t templateId) DoDeleteTemplate() argument
215 DoWriteAntiBruteInfoToFile(uint64_t templateId) DoWriteAntiBruteInfoToFile() argument
[all...]
H A Dexecutor_func_common.c332 uint64_t *subType, uint64_t templateId, uint32_t *freezeTime, uint32_t *count) in GetSubTypeAndFreezeTime()
334 ResultCode ret = GetSubType(templateId, subType); in GetSubTypeAndFreezeTime()
340 ret = GetAntiBruteInfo(templateId, count, &startFreezeTime); in GetSubTypeAndFreezeTime()
346 ret = ComputeFreezeTime(templateId, freezeTime, *count, startFreezeTime); in GetSubTypeAndFreezeTime()
354 int32_t DoQueryPinInfo(uint64_t templateId, PinCredentialInfos *pinCredentialInfo) in DoQueryPinInfo() argument
356 if (pinCredentialInfo == NULL || templateId == INVALID_TEMPLATE_ID) { in DoQueryPinInfo()
361 ResultCode ret = GetSubTypeAndFreezeTime(&(pinCredentialInfo->subType), templateId, in DoQueryPinInfo()
371 ret = GetRemainTimes(templateId, &(pinCredentialInfo->remainTimes), authErrorCount); in DoQueryPinInfo()
380 bool SetResultDataInfo(Attribute *attribute, int32_t resultCode, uint64_t templateId, Buffer *rootSecret) in SetResultDataInfo() argument
388 int32_t queryPinResult = DoQueryPinInfo(templateId, in SetResultDataInfo()
331 GetSubTypeAndFreezeTime( uint64_t *subType, uint64_t templateId, uint32_t *freezeTime, uint32_t *count) GetSubTypeAndFreezeTime() argument
[all...]
H A Dpin_auth.cpp176 uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &extraInfo, PinAlgoParam &pinAlgoParam) in AllInOneAuth()
181 ResultCode result = DoAllInOneAuth(scheduleId, templateId, extraInfo.data(), extraInfo.size(), &authAlgoParam); in AllInOneAuth()
204 int32_t PinAuth::AuthPin(uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &pinData, in AuthPin() argument
216 pinAuthParam.templateId = templateId; in AuthPin()
246 int32_t PinAuth::QueryPinInfo(uint64_t templateId, PinCredentialInfo &pinCredentialInfoRet) in QueryPinInfo() argument
251 int32_t result = DoQueryPinInfo(templateId, &pinCredentialInfosRet); in QueryPinInfo()
265 int32_t PinAuth::DeleteTemplate(uint64_t templateId) in DeleteTemplate() argument
269 ResultCode result = DoDeleteTemplate(templateId); in DeleteTemplate()
340 void PinAuth::WriteAntiBrute(uint64_t templateId) in WriteAntiBrute() argument
175 AllInOneAuth( uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &extraInfo, PinAlgoParam &pinAlgoParam) AllInOneAuth() argument
480 VerifierAuth( uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &extraInfo, std::vector<uint8_t> &msgOut) VerifierAuth() argument
[all...]
H A Dverifier_func.c36 uint64_t templateId; member
187 if (GetSubType(g_verifierSchedule->templateId, &subType) != RESULT_SUCCESS) { in SetVerifyAckDataPinParam()
204 g_verifierSchedule->templateId, algoParam->buf, &(algoParam->contentSize), &algoVersion); in SetVerifyAckDataPinParam()
252 attribute, PinResultToFwkResult(verifierMsg->authResult), g_verifierSchedule->templateId, NULL)) { in GetResultTlv()
285 int32_t DoVerifierAuth(uint64_t scheduleId, uint64_t templateId, VerifierMsg *verifierMsg) in DoVerifierAuth() argument
302 g_verifierSchedule->templateId = templateId; in DoVerifierAuth()
306 result = DoQueryPinInfo(templateId, &pinCredentialInfo); in DoVerifierAuth()
462 ResultCode ret = DoQueryPinInfo(g_verifierSchedule->templateId, &pinCredentialInfo); in AuthPin()
471 ResultCode result = AuthPinById(pinDataBuf, g_verifierSchedule->templateId, NUL in AuthPin()
[all...]
/drivers/peripheral/pin_auth/hdi_service/main/inc/
H A Dall_in_one_func.h30 uint64_t templateId; member
36 uint64_t templateId; member
41 ResultCode DoAllInOneAuth(uint64_t scheduleId, uint64_t templateId,
44 ResultCode DoDeleteTemplate(uint64_t templateId);
49 ResultCode DoWriteAntiBruteInfoToFile(uint64_t templateId);
H A Dpin_auth.h57 int32_t AuthPin(uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &pinData,
59 void WriteAntiBrute(uint64_t templateId);
60 int32_t QueryPinInfo(uint64_t templateId, PinCredentialInfo &pinCredentialInfoRet);
61 int32_t DeleteTemplate(uint64_t templateId);
64 uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &extraInfo, PinAlgoParam &pinAlgoParam);
76 uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &extraInfo, std::vector<uint8_t> &msgOut);
H A Dexecutor_func_common.h81 int32_t DoQueryPinInfo(uint64_t templateId, PinCredentialInfos *pinCredentialInfo);
82 bool SetResultDataInfo(Attribute *attribute, int32_t resultCode, uint64_t templateId, Buffer *rootSecret);
H A Dverifier_func.h38 int32_t DoVerifierAuth(uint64_t scheduleId, uint64_t templateId, VerifierMsg *verifierMsg);
/drivers/peripheral/pin_auth/hdi_service/service/src/
H A Dall_in_one_impl.cpp115 .templateId = 0, in EnrollInner()
161 int32_t AllInOneImpl::AuthenticateInner(uint64_t scheduleId, uint64_t templateId, std::vector<uint8_t> &algoParameter, in AuthenticateInner() argument
166 int32_t result = pinHdi_->QueryPinInfo(templateId, infoRet); in AuthenticateInner()
181 .templateId = templateId, in AuthenticateInner()
235 int32_t AllInOneImpl::AuthPin(uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &data, in AuthPin() argument
238 int32_t result = pinHdi_->AuthPin(scheduleId, templateId, data, resultTlv); in AuthPin()
243 threadPool_.AddTask([hdi = pinHdi_, id = templateId]() { in AuthPin()
281 result = AuthPin(scheduleId, scheduleInfo.templateId, data, resultTlv); in SetData()
296 int32_t AllInOneImpl::Delete(uint64_t templateId) in Delete() argument
338 uint64_t templateId = templateIdList[0]; GetProperty() local
[all...]
/drivers/peripheral/pin_auth/hdi_service/service/inc/
H A Dall_in_one_impl.h48 int32_t Delete(uint64_t templateId) override;
57 uint64_t templateId{0};
72 int32_t AuthPin(uint64_t scheduleId, uint64_t templateId, const std::vector<uint8_t> &data,
74 int32_t AuthenticateInner(uint64_t scheduleId, uint64_t templateId, std::vector<uint8_t> &algoParameter,
/drivers/peripheral/pin_auth/test/unittest/pin_auth/service/src/
H A Dall_in_one_impl_test.cpp62 uint64_t templateId = 0; in HWTEST_F() local
82 result = impl->Delete(templateId); in HWTEST_F()
115 uint64_t templateId = 0; in HWTEST_F() local
140 result = impl->Delete(templateId); in HWTEST_F()
/drivers/peripheral/pin_auth/test/unittest/pin_auth/main/src/
H A Dpin_auth_test.cpp201 static bool GetTemplateIdFromTlv(std::vector<uint8_t> resultTlv, uint64_t &templateId) in GetTemplateIdFromTlv() argument
230 result = GetAttributeUint64(attrbute, ATTR_TEMPLATE_ID, &templateId); in GetTemplateIdFromTlv()
266 uint64_t templateId = 0; in HWTEST_F() local
267 bool ret = GetTemplateIdFromTlv(resultTlv, templateId); in HWTEST_F()
270 result = pinAuth->AuthPin(0, templateId, pinData, resultTlv); in HWTEST_F()
279 result = pinAuth->AllInOneAuth(0, templateId, authExtraInfo, pinAlgoParam); in HWTEST_F()
284 result = pinAuth->QueryPinInfo(templateId, pinCredentialInfo); in HWTEST_F()
297 result = pinAuth->DeleteTemplate(templateId); in HWTEST_F()
/drivers/peripheral/user_auth/test/unittest/service_test/inc/
H A Dsignature_operation.h31 uint64_t templateId; member
/drivers/peripheral/user_auth/hdi_service/database/inc/
H A Didm_database.h47 uint64_t templateId; member
69 void SetCredentialConditionTemplateId(CredentialCondition *condition, uint64_t templateId);

Completed in 10 milliseconds

12