31 #ifndef SIGNON_CRYPTO_MANAGER_H
32 #define SIGNON_CRYPTO_MANAGER_H
34 #include <SignOn/AbstractCryptoManager>
38 #define MINUMUM_ENCRYPTED_FILE_SYSTEM_SIZE 4
50 enum FileSystemMountState {
58 static const uint signonMinumumDbSize;
59 static const char signonDefaultFileSystemName[];
60 static const char signonDefaultFileSystemType[];
64 bool initialize(
const QVariantMap &configuration);
147 const SignOn::Key &existingKey);
157 const SignOn::Key &remainingKey);
160 bool setFileSystemType(
const QString &type);
161 bool setFileSystemSize(
const quint32 size);
162 void setFileSystemPath(
const QString &path);
164 void checkFileSystemSetup();
165 void clearFileSystemResources();
166 bool mountMappedDevice();
167 bool unmountMappedDevice();
168 void updateMountState(
const FileSystemMountState state);
170 static bool createPartitionFile(
const QString &filePath);
171 static bool formatMapFileSystem(
const QString &fileSystemPath);
173 const QString keychainFilePath()
const;
174 void addKeyToKeychain(
const QByteArray &key)
const;
175 void removeKeyFromKeychain(
const QByteArray &key)
const;
176 bool keychainContainsKey(
const QByteArray &key)
const;
180 void serializeData();
183 QString m_fileSystemPath;
184 QString m_fileSystemMapPath;
185 QString m_fileSystemName;
186 QString m_fileSystemMountPath;
187 QString m_loopDeviceName;
189 FileSystemMountState m_mountState;
191 quint32 m_fileSystemSize;
194 #endif // SIGNON_CRYPTOMANAGER_H