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

Function cryptKey

flutter/mmkv_win32/windows/flutter-bridge.cpp:388–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388MMKV_EXPORT void *cryptKey(void *handle, uint64_t *lengthPtr) {
389 MMKV *kv = static_cast<MMKV *>(handle);
390 if (kv && lengthPtr) {
391 auto cryptKey = kv->cryptKey();
392 if (cryptKey.length() > 0) {
393 auto ptr = malloc(cryptKey.length());
394 if (ptr) {
395 memcpy(ptr, cryptKey.data(), cryptKey.length());
396 *lengthPtr = cryptKey.length();
397 return ptr;
398 }
399 }
400 }
401 return nullptr;
402}
403
404MMKV_EXPORT void checkReSetCryptKey(void *handle, char *oKey, uint64_t length, bool aes256) {
405 MMKV *kv = static_cast<MMKV *>(handle);

Callers

nothing calls this directly

Calls 1

cryptKeyMethod · 0.45

Tested by

no test coverage detected