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 bool removeEncryptionKey(
const SignOn::Key &key,
158 const SignOn::Key &remainingKey);
162 bool setFileSystemType(
const QString &type);
163 bool setFileSystemSize(
const quint32 size);
164 void setFileSystemPath(
const QString &path);
166 void checkFileSystemSetup();
167 void clearFileSystemResources();
168 bool mountMappedDevice();
169 bool unmountMappedDevice();
170 void updateMountState(
const FileSystemMountState state);
172 static bool createPartitionFile(
const QString &filePath);
173 static bool formatMapFileSystem(
const QString &fileSystemPath);
175 const QString keychainFilePath()
const;
176 void addKeyToKeychain(
const QByteArray &key)
const;
177 void removeKeyFromKeychain(
const QByteArray &key)
const;
178 bool keychainContainsKey(
const QByteArray &key)
const;
182 void serializeData();
185 QString m_fileSystemPath;
186 QString m_fileSystemMapPath;
187 QString m_fileSystemName;
188 QString m_fileSystemMountPath;
189 QString m_loopDeviceName;
191 FileSystemMountState m_mountState;
193 quint32 m_fileSystemSize;
196 #endif // SIGNON_CRYPTOMANAGER_H
bool deleteFileSystem()
Deletes the encrypted file system.
~CryptoManager()
Destroys a CryptoManager object.
bool mountFileSystem()
Mounts the encrypted file system.
Encrypted file system manager.
bool initialize(const QVariantMap &configuration)
QStringList backupFiles() const
CryptoManager(QObject *parent=0)
Constructs a CryptoManager object with the given parent.
bool encryptionKeyInUse(const SignOn::Key &key)
QString fileSystemMountPath() const
FileSystemType
Supported encrypted partion filesystem type.
bool addEncryptionKey(const SignOn::Key &key, const SignOn::Key &existingKey)
Adds an encryption key to one of the available keyslots of the LUKS partition's header.
bool unmountFileSystem()
Unmounts the encrypted file system.
bool setupFileSystem()
Sets up an encrypted file system.