| 81 | #define CRYPT_DOKANY_DEFAULT_NUM_THREADS 5 |
| 82 | |
| 83 | class CryptContext { |
| 84 | private: |
| 85 | |
| 86 | CryptConfig *m_config; |
| 87 | |
| 88 | public: |
| 89 | RandomBytes *m_prand_bytes; |
| 90 | DirIvCache m_dir_iv_cache; |
| 91 | LongFilenameCache m_lfn_cache; |
| 92 | CaseCache m_case_cache; |
| 93 | EmeCryptContext m_eme; |
| 94 | SivContext m_siv; |
| 95 | int m_bufferblocks; |
| 96 | int m_cache_ttl; |
| 97 | bool m_multithreaded; |
| 98 | bool m_recycle_bin; |
| 99 | bool m_read_only; |
| 100 | bool m_delete_spurrious_files; |
| 101 | bool m_encryptKeysInMemory; |
| 102 | bool m_cacheKeysInMemory; |
| 103 | bool m_denyOtherSessions; |
| 104 | bool m_denyServices; |
| 105 | bool m_flushafterwrite; |
| 106 | vector<wstring> m_deletable_files; |
| 107 | CryptOpenFiles m_openfiles; |
| 108 | CryptOpenHandles m_open_handles; |
| 109 | int m_shortNameMax = SHORT_NAME_MAX_DEFAULT; |
| 110 | private: |
| 111 | bool m_caseinsensitive; |
| 112 | public: |
| 113 | // disallow copying |
| 114 | CryptContext(CryptContext const&) = delete; |
| 115 | void operator=(CryptContext const&) = delete; |
| 116 | |
| 117 | bool IsCaseInsensitive() { return m_caseinsensitive && !m_config->m_reverse && !m_config->m_PlaintextNames; }; |
| 118 | void SetCaseSensitive(bool bCaseSensitive) { m_caseinsensitive = bCaseSensitive; }; |
| 119 | |
| 120 | void GetFsInfo(FsInfo& info); |
| 121 | |
| 122 | HANDLE m_mountEvent; |
| 123 | |
| 124 | bool InitEme(const BYTE *key, bool hkdf); |
| 125 | |
| 126 | CryptContext(); |
| 127 | |
| 128 | CryptConfig *GetConfig() const { return m_config; }; |
| 129 | |
| 130 | bool FinalInitBeforeMounting(bool use_key_cache); |
| 131 | |
| 132 | const vector<wstring>& GetDeletableFiles() { return m_deletable_files; } |
| 133 | |
| 134 | virtual ~CryptContext(); |
| 135 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected