| 1549 | } |
| 1550 | |
| 1551 | static 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 |
nothing calls this directly
no test coverage detected