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

Function cryptKey

flutter/mmkv_linux/linux/flutter-bridge.cpp:387–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

cryptKeyMethod · 0.45

Tested by

no test coverage detected