/base/startup/init/interfaces/hals/utils/token/ |
D | hal_token.c | 20 __attribute__((weak)) static int OEMReadToken(char* token, unsigned int len) in OEMReadToken() argument 23 (void)(token); in OEMReadToken() 28 __attribute__((weak)) static int OEMWriteToken(const char* token, unsigned int len) in OEMWriteToken() argument 31 (void)(token); in OEMWriteToken() 60 __attribute__((weak)) int HalReadToken(char* token, unsigned int len) in HalReadToken() argument 62 if (token == NULL) { in HalReadToken() 66 return OEMReadToken(token, len); in HalReadToken() 69 __attribute__((weak)) int HalWriteToken(const char* token, unsigned int len) in HalWriteToken() argument 71 if (token == NULL) { in HalWriteToken() 75 return OEMWriteToken(token, len); in HalWriteToken()
|
/base/powermgr/power_manager/test/systemtest/src/ |
D | power_mgr_st_mock_test.cpp | 153 sptr<IRemoteObject> token = new RunningLockTokenStub(); variable 155 pms->CreateRunningLock(token, info); 156 pms->Lock(token, info, 0); 157 EXPECT_EQ(pms->IsUsed(token), true); 162 pms->UnLock(token); 163 EXPECT_EQ(pms->IsUsed(token), false); 186 sptr<IRemoteObject> token = new RunningLockTokenStub(); variable 188 pms->CreateRunningLock(token, info); 191 pms->Lock(token, info, 0); 192 EXPECT_EQ(pms->IsUsed(token), true); [all …]
|
D | power_mgr_mock_system_test.cpp | 79 sptr<IRemoteObject> token = new RunningLockTokenStub(); variable 81 pms->CreateRunningLock(token, info); 83 pms->Lock(token, info, 0); 84 EXPECT_EQ(pms->IsUsed(token), true);
|
/base/security/device_auth/services/authenticators/src/account_related/creds_manager/ |
D | asy_token_manager.c | 109 static int32_t GenerateTokenFromJson(const CJson *tokenJson, AccountToken *token) in GenerateTokenFromJson() argument 121 …if (memcpy_s(token->pkInfoStr.val, token->pkInfoStr.length, pkInfoStr, HcStrlen(pkInfoStr) + 1) !=… in GenerateTokenFromJson() 126 token->pkInfoStr.length = HcStrlen(pkInfoStr) + 1; in GenerateTokenFromJson() 128 if (GetByteFromJson(tokenJson, FIELD_PK_INFO_SIGNATURE, token->pkInfoSignature.val, in GenerateTokenFromJson() 129 token->pkInfoSignature.length) != HC_SUCCESS) { in GenerateTokenFromJson() 134 token->pkInfoSignature.length = HcStrlen(signatureStr) / BYTE_TO_HEX_OPER_LENGTH; in GenerateTokenFromJson() 135 if (GetByteFromJson(tokenJson, FIELD_SERVER_PK, token->serverPk.val, in GenerateTokenFromJson() 136 token->serverPk.length) != HC_SUCCESS) { in GenerateTokenFromJson() 141 token->serverPk.length = HcStrlen(serverPkStr) / BYTE_TO_HEX_OPER_LENGTH; in GenerateTokenFromJson() 142 int32_t ret = GeneratePkInfoFromJson(&token->pkInfo, pkInfoJson); in GenerateTokenFromJson() [all …]
|
D | sym_token_manager.c | 48 static bool IsTokenMatch(const SymToken *token, const char *userId, const char *deviceId) in IsTokenMatch() argument 50 return (strcmp(userId, token->userId) == 0) && (strcmp(deviceId, token->deviceId) == 0); in IsTokenMatch() 75 SymToken *token = (SymToken *)HcMalloc(sizeof(SymToken), 0); in CreateSymTokenByJson() local 76 if (token == NULL) { in CreateSymTokenByJson() 83 HcFree(token); in CreateSymTokenByJson() 89 HcFree(token); in CreateSymTokenByJson() 92 if (strcpy_s(token->userId, DEV_AUTH_USER_ID_SIZE, userId) != EOK) { in CreateSymTokenByJson() 94 HcFree(token); in CreateSymTokenByJson() 97 if (strcpy_s(token->deviceId, DEV_AUTH_DEVICE_ID_SIZE, deviceId) != EOK) { in CreateSymTokenByJson() 99 HcFree(token); in CreateSymTokenByJson() [all …]
|
/base/startup/init/interfaces/innerkits/token/src/token_impl_hal/ |
D | token.c | 21 int ReadToken(char *token, unsigned int len) in ReadToken() argument 23 if (token == NULL) { in ReadToken() 28 return HalReadToken(token, len); in ReadToken() 31 int WriteToken(const char *token, unsigned int len) in WriteToken() argument 33 if (token == NULL) { in WriteToken() 38 return HalWriteToken(token, len); in WriteToken()
|
/base/startup/syspara_lite/frameworks/token/src/token_impl_hal/ |
D | token.c | 21 int ReadToken(char *token, unsigned int len) in ReadToken() argument 23 if (token == NULL) { in ReadToken() 28 return HalReadToken(token, len); in ReadToken() 31 int WriteToken(const char *token, unsigned int len) in WriteToken() argument 33 if (token == NULL) { in WriteToken() 38 return HalWriteToken(token, len); in WriteToken()
|
/base/security/access_token/ |
D | README.md | 16 …token information of an app includes the app identifier (**APPID**), user ID, app twin index, app … 19 - Verifying app permissions based on the token ID before an app accesses sensitive data or calls … 20 - Obtaining access token information (for example, APL) based on the token ID. 28 │ ├── tokensync # Stores code of the access token synchronization framework. 32 │ ├── accesstoken # Stores code of access token internal APIs. 33 │ ├── nativetoken # Stores code of native token APIs. 34 │ └── tokensync # Stores code of the internal APIs for access token synchronization. 37 └── tokensyncmanager # Stores code of the access token synchronization service. 45 …Token(const HapInfoParams& info, const HapPolicyParams& policy); | Allocates a token ID to an app.| 46 …string& remoteDeviceID, AccessTokenID remoteTokenID); | Allocates a local token ID to the app of a… [all …]
|
/base/startup/init/interfaces/innerkits/token/ |
D | BUILD.gn | 23 "//base/startup/init/interfaces/innerkits/include/token", 25 "//base/startup/init/interfaces/innerkits/token", 27 sources = [ "src/token_impl_posix/token.c" ] 30 "$ohos_product_adapter_dir/utils/token:haltoken_shared", 38 sources = [ "src/token_impl_hal/token.c" ] 42 "//base/startup/init/interfaces/innerkits/include/token", 44 "//base/startup/init/interfaces/innerkits/token", 48 rebase_path("//${ohos_product_adapter_dir}/utils/token") 53 deps += [ "$ohos_product_adapter_dir/utils/token:hal_token_static" ] 56 [ "//base/startup/init/interfaces/hals/utils/token:static_hal_token" ] [all …]
|
/base/account/os_account/services/accountmgr/test/unittest/app_account/ |
D | app_account_info_test.cpp | 562 EXPECT_EQ(tokens[0].token, STRING_TOKEN); 608 ASSERT_EQ(tokenInfos[STRING_AUTH_TYPE].token, STRING_TOKEN); 719 std::string token; variable 720 ErrCode result = appAccountInfo.GetOAuthToken(STRING_AUTH_TYPE, token); 722 token = STRING_TOKEN; 723 result = appAccountInfo.SetOAuthToken(STRING_AUTH_TYPE, token); 725 token = STRING_EMPTY; 726 result = appAccountInfo.GetOAuthToken(STRING_AUTH_TYPE, token); 728 EXPECT_EQ(token, STRING_TOKEN); 729 result = appAccountInfo.DeleteOAuthToken(STRING_AUTH_TYPE, token); [all …]
|
/base/startup/syspara_lite/frameworks/token/src/token_impl_posix/ |
D | token.c | 40 int ReadToken(char *token, unsigned int len) in ReadToken() argument 44 if (token == NULL) { in ReadToken() 54 ret = HalReadToken(token, len); in ReadToken() 60 int WriteToken(const char *token, unsigned int len) in WriteToken() argument 64 if (token == NULL) { in WriteToken() 74 ret = HalWriteToken(token, len); in WriteToken()
|
/base/startup/init/interfaces/innerkits/token/src/token_impl_posix/ |
D | token.c | 40 int ReadToken(char *token, unsigned int len) in ReadToken() argument 44 if (token == NULL) { in ReadToken() 54 ret = HalReadToken(token, len); in ReadToken() 60 int WriteToken(const char *token, unsigned int len) in WriteToken() argument 64 if (token == NULL) { in WriteToken() 74 ret = HalWriteToken(token, len); in WriteToken()
|
/base/security/access_token/interfaces/innerkits/token_setproc/src/ |
D | token_setproc.c | 52 uint64_t token = INVAL_TOKEN_ID; in GetSelfTokenID() local 57 int ret = ioctl(fd, ACCESS_TOKENID_GET_TOKENID, &token); in GetSelfTokenID() 64 return token; in GetSelfTokenID() 85 uint64_t token = INVAL_TOKEN_ID; in GetFirstCallerTokenID() local 90 int ret = ioctl(fd, ACCESS_TOKENID_GET_FTOKENID, &token); in GetFirstCallerTokenID() 97 return token; in GetFirstCallerTokenID()
|
/base/notification/distributed_notification_service/services/ans/src/ |
D | notification_dialog.cpp | 39 sptr<IRemoteObject> token; in StartEnableNotificationDialogAbility() local 40 int result = IN_PROCESS_CALL(AAFwk::AbilityManagerClient::GetInstance()->GetTopAbility(token)); in StartEnableNotificationDialogAbility() 41 std::shared_ptr<AAFwk::AbilityRecord> ability = AAFwk::Token::GetAbilityRecordByToken(token); in StartEnableNotificationDialogAbility() 54 want.SetParam("tokenId", token); in StartEnableNotificationDialogAbility() 56 result = AAFwk::AbilityManagerClient::GetInstance()->StartAbility(want, token, -1); in StartEnableNotificationDialogAbility()
|
/base/useriam/face_auth/ui/Settings_FaceAuth/entry/src/main/ets/model/ |
D | userIdmModel.ts | 24 protected token: Uint8Array property in UserIdmModel 45 setToken(token: Uint8Array) { 46 let tokenStr = CommonController.uin8Array2JsonString(token); 48 Log.info(this.TAG, "setToken ok, size " + token.length) 53 let token = CommonController.jsonString2Uint8Array(tokenStr) 54 Log.info(this.TAG, "getToken ok, size " + token.length) 55 return token 96 token: localToken,
|
/base/powermgr/power_manager/services/native/test/unittest/src/ |
D | power_mgr_mock_test.cpp | 923 sptr<IRemoteObject> token = new RunningLockTokenStub(); variable 925 pms->CreateRunningLock(token, info); 926 pms->Lock(token, info, 0); 927 EXPECT_EQ(pms->IsUsed(token), true); 932 pms->UnLock(token); 933 EXPECT_EQ(pms->IsUsed(token), false); 956 sptr<IRemoteObject> token = new RunningLockTokenStub(); variable 958 pms->CreateRunningLock(token, info); 961 pms->Lock(token, info, 0); 962 EXPECT_EQ(pms->IsUsed(token), true); [all …]
|
/base/hiviewdfx/faultloggerd/services/ |
D | fault_logger_secure.cpp | 102 char *token = strtok_s(reinterpret_cast<char *>(resp), delim, &buf); in CheckUidAndPid() local 103 if (token == nullptr) { in CheckUidAndPid() 106 token = strtok_s(nullptr, delim, &buf); in CheckUidAndPid() 107 while (token != nullptr) { in CheckUidAndPid() 108 int tokenPID = atoi(token); in CheckUidAndPid() 113 token = strtok_s(nullptr, delim, &buf); in CheckUidAndPid()
|
/base/powermgr/power_manager/services/native/test/unittest/include/ |
D | running_lock_test.h | 37 void TestRunningLockInnerExisit(sptr<IRemoteObject>& token, RunningLockInfo& runningLockInfo) in TestRunningLockInnerExisit() argument 40 auto iterator = lockMap.find(token); in TestRunningLockInnerExisit() 48 void TestRunningLockInnerNoExisit(sptr<IRemoteObject>& token) in TestRunningLockInnerNoExisit() argument 51 auto iterator = lockMap.find(token); in TestRunningLockInnerNoExisit()
|
/base/security/huks/interfaces/kits/napi/src/v8/ |
D | huks_napi_init.cpp | 44 struct HksBlob *token = nullptr; member 70 if (context->token != nullptr) { in DeleteInitAsyncContext() 71 FreeHksBlob(context->token); in DeleteInitAsyncContext() 120 context->token = static_cast<HksBlob *>(HksMalloc(sizeof(HksBlob))); in InitOutParams() 121 if (context->token == nullptr) { in InitOutParams() 125 context->token->data = static_cast<uint8_t *>(HksMalloc(HKS_MAX_TOKEN_SIZE)); in InitOutParams() 126 if (context->token->data == nullptr) { in InitOutParams() 130 context->token->size = HKS_MAX_TOKEN_SIZE; in InitOutParams() 136 return GenerateHksHandle(env, context->result, context->handle, context->token); in InitWriteResult() 162 napiContext->paramSet, napiContext->handle, napiContext->token); in InitAsyncWork()
|
/base/security/huks/interfaces/kits/napi/src/v9/ |
D | huks_napi_init_session.cpp | 44 struct HksBlob *token = nullptr; member 70 if (context->token != nullptr) { in DeleteInitAsyncContext() 71 FreeHksBlob(context->token); in DeleteInitAsyncContext() 120 context->token = static_cast<struct HksBlob *>(HksMalloc(sizeof(HksBlob))); in InitOutParams() 121 if (context->token == nullptr) { in InitOutParams() 125 context->token->data = static_cast<uint8_t *>(HksMalloc(HKS_MAX_TOKEN_SIZE)); in InitOutParams() 126 if (context->token->data == nullptr) { in InitOutParams() 130 context->token->size = HKS_MAX_TOKEN_SIZE; in InitOutParams() 157 napiContext->handle, napiContext->token); in InitAsyncWork() 164 resultData.challenge = napiContext->token; in InitAsyncWork()
|
/base/update/updater/services/flashd/daemon/ |
D | flashd_utils.cpp | 68 auto token = strtok_s(buffer.data(), delimit, &nextToken); in Split() local 69 while (token != nullptr) { in Split() 70 if (find(filter.cbegin(), filter.cend(), token) == filter.cend()) { in Split() 71 result.push_back(token); in Split() 73 token = strtok_s(nullptr, delimit, &nextToken); in Split()
|
/base/inputmethod/imf/frameworks/kits/extension/src/ |
D | inputmethod_extension.cpp | 44 const sptr<IRemoteObject> &token) in Init() argument 47 ExtensionBase<InputMethodExtensionContext>::Init(record, application, handler, token); in Init() 52 std::shared_ptr<AbilityHandler> &handler, const sptr<IRemoteObject> &token) in CreateAndInitContext() argument 56 …ensionBase<InputMethodExtensionContext>::CreateAndInitContext(record, application, handler, token); in CreateAndInitContext()
|
/base/theme/wallpaper_mgr/frameworks/kits/extension/src/ |
D | wallpaper_extension.cpp | 47 const sptr<IRemoteObject> &token) in Init() argument 50 ExtensionBase<WallpaperExtensionContext>::Init(record, application, handler, token); in Init() 58 const sptr<IRemoteObject> &token) in CreateAndInitContext() argument 62 …xtensionBase<WallpaperExtensionContext>::CreateAndInitContext(record, application, handler, token); in CreateAndInitContext()
|
/base/customization/enterprise_device_management/framework/extension/src/ |
D | enterprise_admin_extension.cpp | 44 const sptr<IRemoteObject>& token) in Init() argument 47 ExtensionBase<EnterpriseAdminExtensionContext>::Init(record, application, handler, token); in Init() 54 const sptr<IRemoteObject>& token) in CreateAndInitContext() argument 57 …onBase<EnterpriseAdminExtensionContext>::CreateAndInitContext(record, application, handler, token); in CreateAndInitContext()
|
/base/powermgr/powermgr_lite/frameworks/include/ |
D | running_lock_entry.h | 29 uint64_t token; member 54 return ((a->pid == b->pid) && (a->token == b->token)) ? TRUE : FALSE; in IsSameRunningLockIdentity()
|