| 302 | |
| 303 | # ifndef MMKV_DISABLE_CRYPT |
| 304 | void 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 |
no test coverage detected