| 622 | } |
| 623 | |
| 624 | MMBuffer MMKV::getRawDataForKey(MMKVKey_t key) { |
| 625 | checkLoadData(); |
| 626 | #ifndef MMKV_DISABLE_CRYPT |
| 627 | if (m_crypter) { |
| 628 | auto itr = m_dicCrypt->find(key); |
| 629 | if (itr != m_dicCrypt->end()) { |
| 630 | auto basePtr = (uint8_t *) (m_file->getMemory()) + Fixed32Size; |
| 631 | return itr->second.toMMBuffer(basePtr, m_crypter); |
| 632 | } |
| 633 | } else |
| 634 | #endif |
| 635 | { |
| 636 | auto itr = m_dic->find(key); |
| 637 | if (itr != m_dic->end()) { |
| 638 | auto basePtr = (uint8_t *) (m_file->getMemory()) + Fixed32Size; |
| 639 | return itr->second.toMMBuffer(basePtr); |
| 640 | } |
| 641 | } |
| 642 | MMBuffer nan; |
| 643 | return nan; |
| 644 | } |
| 645 | |
| 646 | mmkv::MMBuffer MMKV::getDataForKey(MMKVKey_t key) { |
| 647 | if (mmkv_unlikely(m_enableKeyExpire)) { |
nothing calls this directly
no test coverage detected