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

Method checkReSetCryptKey

Core/MMKV_Android.cpp:304–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302
303# ifndef MMKV_DISABLE_CRYPT
304void MMKV::checkReSetCryptKey(int fd, int metaFD, const string *cryptKey, bool aes256) {
305 SCOPED_LOCK(m_lock);
306
307 checkReSetCryptKey(cryptKey, aes256);
308
309 if (m_file->m_fileType & MMFILE_TYPE_ASHMEM) {
310 if (m_file->getFd() != fd) {
311 ::close(fd);
312 }
313 if (m_metaFile->getFd() != metaFD) {
314 ::close(metaFD);
315 }
316 }
317}
318# endif // MMKV_DISABLE_CRYPT
319
320#ifndef MMKV_OHOS

Callers 1

mmkvWithAshmemFDMethod · 0.45

Calls 3

closeFunction · 0.85
checkReSetCryptKeyFunction · 0.50
getFdMethod · 0.45

Tested by

no test coverage detected