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 bool deleteFileSystem()
Deletes the encrypted file system.
~CryptoManager()
Destroys a CryptoManager object.
bool mountFileSystem()
Mounts the encrypted file system.
bool removeEncryptionKey(const SignOn::Key &key, const SignOn::Key &remainingKey)
Releases an existing used keyslot in the LUKS partition's header.
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.