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

Function cryptKey

OpenHarmony/MMKV/src/main/cpp/flutter-bridge.cpp:406–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

cryptKeyMethod · 0.45

Tested by

no test coverage detected