MCPcopy Create free account
hub / github.com/Tencent/MMKV / checkReSetCryptKey

Function checkReSetCryptKey

OpenHarmony/MMKV/src/main/cpp/native_bridge.cpp:1551–1565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1549}
1550
1551static napi_value checkReSetCryptKey(napi_env env, napi_callback_info info) {
1552 size_t argc = 3;
1553 napi_value args[3] = {nullptr};
1554 NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1555
1556 auto handle = NValueToUInt64(env, args[0]);
1557 auto cryptKey = NValueToString(env, args[1], true);
1558 auto aes256 = NValueToBool(env, args[2], true);
1559 MMKV *kv = reinterpret_cast<MMKV *>(handle);
1560 if (kv) {
1561 auto cryptKeyPtr = cryptKey.empty() ? nullptr : &cryptKey;
1562 kv->checkReSetCryptKey(cryptKeyPtr, aes256);
1563 }
1564 return NAPIUndefined(env);
1565}
1566
1567#endif
1568

Callers

nothing calls this directly

Calls 5

NValueToUInt64Function · 0.85
NValueToBoolFunction · 0.85
NAPIUndefinedFunction · 0.85
NValueToStringFunction · 0.70
checkReSetCryptKeyMethod · 0.45

Tested by

no test coverage detected