| 1521 | #ifndef MMKV_DISABLE_CRYPT |
| 1522 | |
| 1523 | static napi_value cryptKey(napi_env env, napi_callback_info info) { |
| 1524 | size_t argc = 1; |
| 1525 | napi_value args[1] = {nullptr}; |
| 1526 | NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr)); |
| 1527 | |
| 1528 | auto handle = NValueToUInt64(env, args[0]); |
| 1529 | MMKV *kv = reinterpret_cast<MMKV *>(handle); |
| 1530 | if (kv) { |
| 1531 | return StringToNValue(env, kv->cryptKey()); |
| 1532 | } |
| 1533 | return NAPIUndefined(env); |
| 1534 | } |
| 1535 | |
| 1536 | static napi_value reKey(napi_env env, napi_callback_info info) { |
| 1537 | size_t argc = 3; |
nothing calls this directly
no test coverage detected