/base/security/huks/interfaces/kits/liteapi/include/ |
H A D | hks_lite_api.h | 27 static JSIValue generateKeyItem(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 28 static JSIValue initSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 29 static JSIValue updateSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 30 static JSIValue finishSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 31 static JSIValue abortSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 32 static JSIValue deleteKeyItem(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 33 static JSIValue isKeyItemExist(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 34 static JSIValue hasKeyItem(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 35 static JSIValue importKeyItem(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 36 static JSIValue exportKeyItem(const JSIValue thisVal, cons [all...] |
/base/security/crypto_framework/frameworks/js/jsi/inc/ |
H A D | jsi_api.h | 29 static JSIValue CreateMd(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 30 static JSIValue CreateRandom(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 35 static JSIValue Update(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 36 static JSIValue UpdateSync(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 37 static JSIValue Digest(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 38 static JSIValue DigestSync(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 39 static JSIValue GetMdLength(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 42 static JSIValue GenerateRandom(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 43 static JSIValue GenerateRandomSync(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 44 static JSIValue SetSeed(const JSIValue thisVal, cons [all...] |
/base/hiviewdfx/hilog_lite/frameworks/js/builtin/include/ |
H A D | hilog_module.h | 37 static JSIValue Debug(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
38 static JSIValue Info(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
39 static JSIValue Error(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
40 static JSIValue Warn(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
41 static JSIValue Fatal(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
42 static JSIValue IsLoggable(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
45 static JSIValue HilogImpl(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, int level);
47 const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, HilogVector *params);
48 static void ParseNapiValue(const JSIValue thisVal, const JSIValue *element, HilogVector *params);
|
/base/powermgr/battery_lite/frameworks/js/builtin/include/ |
H A D | battery_module.h | 28 static JSIValue GetBatterySOC(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
29 static JSIValue GetChargingStatus(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
30 static JSIValue GetHealthStatus(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
31 static JSIValue GetPluggedType(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
32 static JSIValue GetVoltage(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
33 static JSIValue GetTechnology(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
34 static JSIValue GetTemperature(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
|
/base/powermgr/battery_lite/frameworks/js/builtin/src/ |
H A D | battery_module.cpp | 23 void SuccessCallBack(const JSIValue thisVal, const JSIValue args, JSIValue jsiValue)
in SuccessCallBack() argument 32 JSI::CallFunction(success, thisVal, nullptr, 0);
in SuccessCallBack() 34 JSI::CallFunction(success, thisVal, &jsiValue, ARGC_ONE);
in SuccessCallBack() 38 JSI::CallFunction(complete, thisVal, nullptr, 0);
in SuccessCallBack() 44 JSIValue BatteryModule::GetBatterySOC(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in GetBatterySOC() argument 55 SuccessCallBack(thisVal, args[0], result);
in GetBatterySOC() 60 JSIValue BatteryModule::GetChargingStatus(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in GetChargingStatus() argument 71 SuccessCallBack(thisVal, args[0], result);
in GetChargingStatus() 76 JSIValue BatteryModule::GetHealthStatus(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in GetHealthStatus() argument 87 SuccessCallBack(thisVal, arg in GetHealthStatus() 92 GetPluggedType(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) GetPluggedType() argument 109 GetVoltage(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) GetVoltage() argument 125 GetTechnology(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) GetTechnology() argument 141 GetTemperature(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) GetTemperature() argument [all...] |
/base/security/crypto_framework/frameworks/js/jsi/src/ |
H A D | jsi_md.cpp | 27 JSIValue CryptoFrameworkLiteModule::CreateMd(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in CreateMd() argument 69 JSIValue CryptoFrameworkLiteModule::Update(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in Update() argument 75 HcfMd *mdObj = reinterpret_cast<HcfMd *>((uint32_t)JSI::GetNumberProperty(thisVal, "mdObj")); in Update() 78 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], HCF_INVALID_PARAMS, JSI::CreateNull()); in Update() 87 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], HCF_INVALID_PARAMS, JSI::CreateNull()); in Update() 95 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], errCode, JSI::CreateNull()); in Update() 98 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], HCF_SUCCESS, JSI::CreateNull()); in Update() 103 JSIValue CryptoFrameworkLiteModule::UpdateSync(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in UpdateSync() argument 109 HcfMd *mdObj = reinterpret_cast<HcfMd *>((uint32_t)JSI::GetNumberProperty(thisVal, "mdObj")); in UpdateSync() 131 JSIValue CryptoFrameworkLiteModule::Digest(const JSIValue thisVal, cons argument 158 DigestSync(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) DigestSync() argument 180 GetMdLength(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) GetMdLength() argument [all...] |
H A D | jsi_rand.cpp | 29 JSIValue CryptoFrameworkLiteModule::CreateRandom(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in CreateRandom() argument 59 JSIValue CryptoFrameworkLiteModule::GenerateRandom(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in GenerateRandom() argument 66 HcfRand *randObj = reinterpret_cast<HcfRand *>((uint32_t)JSI::GetNumberProperty(thisVal, "randObj")); in GenerateRandom() 69 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], HCF_INVALID_PARAMS, JSI::CreateUndefined()); in GenerateRandom() 76 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], HCF_INVALID_PARAMS, JSI::CreateUndefined()); in GenerateRandom() 83 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], res, JSI::CreateUndefined()); in GenerateRandom() 88 CallbackErrorCodeOrDataResult(thisVal, args[ARRAY_INDEX_ONE], res, outVlaue); in GenerateRandom() 94 JSIValue CryptoFrameworkLiteModule::GenerateRandomSync(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in GenerateRandomSync() argument 101 HcfRand *randObj = reinterpret_cast<HcfRand *>((uint32_t)JSI::GetNumberProperty(thisVal, "randObj")); in GenerateRandomSync() 125 JSIValue CryptoFrameworkLiteModule::SetSeed(const JSIValue thisVal, cons argument [all...] |
H A D | jsi_api_common.cpp | 22 void JsiAsyncCallback(const JSIValue thisVal, const JSIValue args, const JSIValue *params, uint8_t paramsNum) in JsiAsyncCallback() argument 25 JSI::CallFunction(args, thisVal, para, paramsNum); in JsiAsyncCallback()
|
H A D | jsi_api_errcode.cpp | 71 void CallbackErrorCodeOrDataResult(const JSIValue thisVal, const JSIValue args, int32_t errCode, const JSIValue data) in CallbackErrorCodeOrDataResult() argument 79 JsiAsyncCallback(thisVal, args, params, ARRAY_MAX_SIZE); in CallbackErrorCodeOrDataResult() 84 JsiAsyncCallback(thisVal, args, params, ARRAY_MAX_SIZE); in CallbackErrorCodeOrDataResult()
|
/base/powermgr/powermgr_lite/interfaces/kits/battery/js/builtin/src/ |
H A D | battery_module.cpp | 22 void SuccessCallBack(const JSIValue thisVal, const JSIValue args, JSIValue jsiValue) in SuccessCallBack() argument 31 JSI::CallFunction(success, thisVal, nullptr, 0); in SuccessCallBack() 33 JSI::CallFunction(success, thisVal, &jsiValue, ARGC_ONE); in SuccessCallBack() 37 JSI::CallFunction(complete, thisVal, nullptr, 0); in SuccessCallBack() 42 JSIValue BatteryModule::GetStatus(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in GetStatus() argument 55 SuccessCallBack(thisVal, args[0], result); in GetStatus()
|
/base/security/huks/interfaces/kits/liteapi/src/ |
H A D | hks_lite_api_get_key_properties.cpp | 28 JSIValue HksLiteModule::getKeyProperties(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in getKeyProperties() argument 30 (void)thisVal; in getKeyProperties() 41 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], HKS_ERROR_API_NOT_SUPPORTED); in getKeyProperties()
|
H A D | hks_lite_api_has_key_item.cpp | 28 JSIValue HksLiteModule::hasKeyItem(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in hasKeyItem() argument 30 (void)thisVal; in hasKeyItem() 41 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], HKS_ERROR_API_NOT_SUPPORTED); in hasKeyItem()
|
H A D | hks_lite_api_import_wrapped_key_item.cpp | 28 JSIValue HksLiteModule::importWrappedKeyItem(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in importWrappedKeyItem() argument 30 (void)thisVal; in importWrappedKeyItem() 41 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], HKS_ERROR_API_NOT_SUPPORTED); in importWrappedKeyItem()
|
H A D | hks_lite_api_update_finish_session.cpp | 67 static JSIValue InnerUpdateFinishSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, in InnerUpdateFinishSession() argument 108 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in InnerUpdateFinishSession() 110 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in InnerUpdateFinishSession() 120 JSIValue HksLiteModule::updateSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in updateSession() argument 122 return InnerUpdateFinishSession(thisVal, args, argsNum, HksCallUpdateSession); in updateSession() 125 JSIValue HksLiteModule::finishSession(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in finishSession() argument 127 return InnerUpdateFinishSession(thisVal, args, argsNum, HksCallFinishSession); in finishSession()
|
H A D | hks_lite_api_abort_session.cpp | 32 JSIValue HksLiteModule::abortSession(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in abortSession() argument 57 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in abortSession() 59 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in abortSession()
|
H A D | hks_lite_api_generate_key_item.cpp | 38 JSIValue HksLiteModule::generateKeyItem(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in generateKeyItem() argument 63 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in generateKeyItem() 65 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in generateKeyItem()
|
H A D | hks_lite_api_delete_key_item.cpp | 38 JSIValue HksLiteModule::deleteKeyItem(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in deleteKeyItem() argument 63 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in deleteKeyItem() 65 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in deleteKeyItem()
|
H A D | hks_lite_api_init_session.cpp | 45 JSIValue HksLiteModule::initSession(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in initSession() argument 71 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in initSession() 73 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in initSession()
|
H A D | hks_lite_api_is_key_item_exist.cpp | 38 JSIValue HksLiteModule::isKeyItemExist(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in isKeyItemExist() argument 63 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in isKeyItemExist() 65 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in isKeyItemExist()
|
H A D | hks_lite_api_export_key_item.cpp | 52 JSIValue HksLiteModule::exportKeyItem(const JSIValue thisVal, const JSIValue* args, uint8_t argsNum) in exportKeyItem() argument 84 HksCallbackResultSuccess(thisVal, args[ARGS_INDEX_2], &result); in exportKeyItem() 86 HksCallbackResultFailure(thisVal, args[ARGS_INDEX_2], ret); in exportKeyItem()
|
/base/security/permission_lite/services/js_api/src/ |
H A D | perm_module.cpp | 23 JSIValue PermModule::CheckSelfPerm(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in CheckSelfPerm() argument 40 JSI::CallFunction(fail, thisVal, argv, ARGC_ONE);
in CheckSelfPerm() 44 JSI::CallFunction(success, thisVal, argv, ARGC_ONE);
in CheckSelfPerm() 48 JSI::CallFunction(complete, thisVal, nullptr, 0);
in CheckSelfPerm()
|
/base/security/huks/frameworks/crypto_lite/js/builtin/src/ |
H A D | cipher_module.cpp | 23 JSIValue CipherModule::Rsa(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in Rsa() argument 47 JSI::CallFunction(fail, thisVal, argvFail, ARGC_TWO); in Rsa() 60 JSI::CallFunction(fail, thisVal, argvFail, ARGC_TWO); in Rsa() 66 JSI::CallFunction(fail, thisVal, argvFail, ARGC_TWO); in Rsa() 76 JSI::CallFunction(fail, thisVal, argvFail, ARGC_TWO); in Rsa() 80 JSI::CallFunction(success, thisVal, argvSuccess, ARGC_ONE); in Rsa() 88 JSI::CallFunction(complete, thisVal, nullptr, 0); in Rsa() 97 JSIValue CipherModule::Aes(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) in Aes() argument 126 JSI::CallFunction(fail, thisVal, argvFail, ARGC_TWO); in Aes() 137 JSI::CallFunction(fail, thisVal, argvFai in Aes() [all...] |
/base/hiviewdfx/hilog_lite/test/unittest/ |
H A D | hilog_lite_test.cpp | 241 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); in HWTEST_F() local 243 ACELite::JSIValue resultValue = ACELite::HilogModule::Debug(thisVal, &args, LOG_ARG_NUMBER); in HWTEST_F() 257 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); in HWTEST_F() local 259 ACELite::JSIValue resultValue = ACELite::HilogModule::Info(thisVal, &args, LOG_ARG_NUMBER); in HWTEST_F() 273 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); in HWTEST_F() local 275 ACELite::JSIValue resultValue = ACELite::HilogModule::Error(thisVal, &args, LOG_ARG_NUMBER); in HWTEST_F() 289 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); in HWTEST_F() local 291 ACELite::JSIValue resultValue = ACELite::HilogModule::Warn(thisVal, &args, LOG_ARG_NUMBER); in HWTEST_F() 305 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); in HWTEST_F() local 307 ACELite::JSIValue resultValue = ACELite::HilogModule::Fatal(thisVal, in HWTEST_F() 320 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); HWTEST_F() local 338 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); HWTEST_F() local 356 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); HWTEST_F() local 374 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); HWTEST_F() local 392 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); HWTEST_F() local 410 ACELite::JSIValue thisVal = ACELite::JSI::CreateString(HILOG_THIS_VAL); HWTEST_F() local [all...] |
/base/hiviewdfx/hilog_lite/frameworks/js/builtin/src/ |
H A D | hilog_module.cpp | 142 JSIValue HilogModule::Debug(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in Debug() argument 144 return HilogModule::HilogImpl(thisVal, args, argsNum, LogLevel::LOG_DEBUG);
in Debug() 147 JSIValue HilogModule::Info(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in Info() argument 149 return HilogModule::HilogImpl(thisVal, args, argsNum, LogLevel::LOG_INFO);
in Info() 152 JSIValue HilogModule::Error(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in Error() argument 154 return HilogModule::HilogImpl(thisVal, args, argsNum, LogLevel::LOG_ERROR);
in Error() 157 JSIValue HilogModule::Warn(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in Warn() argument 159 return HilogModule::HilogImpl(thisVal, args, argsNum, LogLevel::LOG_WARN);
in Warn() 162 JSIValue HilogModule::Fatal(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum)
in Fatal() argument 164 return HilogModule::HilogImpl(thisVal, arg in Fatal() 176 IsLoggable(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum) IsLoggable() argument 215 ParseNapiValue(const JSIValue thisVal, const JSIValue *element, HilogVector *params) ParseNapiValue() argument 239 HilogImpl(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, int level) HilogImpl() argument 290 HilogImplParseValue( const JSIValue thisVal, const JSIValue *args, uint8_t argsNum, HilogVector *params) HilogImplParseValue() argument [all...] |
/base/security/huks/frameworks/crypto_lite/js/builtin/include/ |
H A D | cipher_module.h | 27 static JSIValue Rsa(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum); 28 static JSIValue Aes(const JSIValue thisVal, const JSIValue *args, uint8_t argsNum);
|