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

Function cryptKey

Android/MMKV/mmkv/src/main/cpp/flutter-bridge.cpp:409–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409MMKV_EXPORT void *cryptKey(void *handle, uint64_t *lengthPtr) {
410 MMKV *kv = static_cast<MMKV *>(handle);
411 if (kv && lengthPtr) {
412 auto cryptKey = kv->cryptKey();
413 if (cryptKey.length() > 0) {
414 auto ptr = malloc(cryptKey.length());
415 if (ptr) {
416 memcpy(ptr, cryptKey.data(), cryptKey.length());
417 *lengthPtr = cryptKey.length();
418 return ptr;
419 }
420 }
421 }
422 return nullptr;
423}
424
425MMKV_EXPORT void checkReSetCryptKey(void *handle, char *oKey, uint64_t length, bool aes256) {
426 MMKV *kv = static_cast<MMKV *>(handle);

Callers

nothing calls this directly

Calls 1

cryptKeyMethod · 0.45

Tested by

no test coverage detected