signon
8.58
|
Wraps the libcryptsetup API functionality. More...
#include <crypto-handlers.h>
Static Public Member Functions | |
static bool | formatFile (const QByteArray &key, const QString &deviceName) |
Formats the file system. | |
static bool | openFile (const QByteArray &key, const QString &deviceName, const QString &deviceMap) |
Opens the file system. | |
static bool | closeFile (const QString &deviceName) |
Closes the file system. | |
static bool | removeFile (const QString &deviceName) |
Removes the file system. | |
static bool | addKeySlot (const QString &deviceName, const QByteArray &key, const QByteArray &existingKey) |
Adds a key to a free encryption header slot. | |
static bool | removeKeySlot (const QString &deviceName, const QByteArray &key, const QByteArray &remainingKey) |
Removes a key ocupying an encryption header slot. | |
static bool | loadDmMod () |
Loads the `dm_mod` kernel module. | |
static QString | error () |
Wraps the libcryptsetup API functionality.
Definition at line 199 of file crypto-handlers.h.
bool CryptsetupHandler::addKeySlot | ( | const QString & | deviceName, |
const QByteArray & | key, | ||
const QByteArray & | existingKey | ||
) | [static] |
Adds a key to a free encryption header slot.
This operation is to be executed if at least one key is already set in the LUKS header.
deviceName,name | of the device. |
key,the | key to be added. |
existingKey,an | already existing key. |
Definition at line 533 of file crypto-handlers.cpp.
References crypt_luksAddKeyBinary(), error(), SIGNON_LUKS_CIPHER, SIGNON_LUKS_KEY_SIZE, and TRACE.
Referenced by CryptoManager::addEncryptionKey().
bool CryptsetupHandler::closeFile | ( | const QString & | deviceName | ) | [static] |
Closes the file system.
deviceName,name | of the mapped device to be closed. |
Definition at line 464 of file crypto-handlers.cpp.
References error(), and TRACE.
Referenced by CryptoManager::mountFileSystem(), CryptoManager::setupFileSystem(), and CryptoManager::unmountFileSystem().
QString CryptsetupHandler::error | ( | ) | [static] |
Definition at line 660 of file crypto-handlers.cpp.
Referenced by addKeySlot(), closeFile(), formatFile(), openFile(), and removeKeySlot().
bool CryptsetupHandler::formatFile | ( | const QByteArray & | key, |
const QString & | deviceName | ||
) | [static] |
Formats the file system.
key,key | of the ecrypted file system |
deviceName,name | of the loop device LUKS formatted. |
Definition at line 313 of file crypto-handlers.cpp.
References crypt_luksFormatBinary(), error(), SIGNON_LUKS_BASE_KEYSLOT, SIGNON_LUKS_CIPHER, SIGNON_LUKS_KEY_SIZE, and TRACE.
Referenced by CryptoManager::setupFileSystem().
bool CryptsetupHandler::loadDmMod | ( | ) | [static] |
Loads the `dm_mod` kernel module.
Definition at line 652 of file crypto-handlers.cpp.
References SystemCommandLineCallHandler::makeCall().
Referenced by CryptoManager::CryptoManager(), CryptoManager::mountFileSystem(), and CryptoManager::setupFileSystem().
bool CryptsetupHandler::openFile | ( | const QByteArray & | key, |
const QString & | deviceName, | ||
const QString & | deviceMap | ||
) | [static] |
Opens the file system.
key,key | of the ecrypted file system |
deviceName,name | of the loop device to be opened. |
deviceMap,name | of the device mapper mapped device. |
Definition at line 404 of file crypto-handlers.cpp.
References crypt_luksOpenBinary(), error(), and TRACE.
Referenced by CryptoManager::mountFileSystem(), and CryptoManager::setupFileSystem().
bool CryptsetupHandler::removeFile | ( | const QString & | deviceName | ) | [static] |
Removes the file system.
deviceName,name | of the device. |
Definition at line 492 of file crypto-handlers.cpp.
bool CryptsetupHandler::removeKeySlot | ( | const QString & | deviceName, |
const QByteArray & | key, | ||
const QByteArray & | remainingKey | ||
) | [static] |
Removes a key ocupying an encryption header slot.
deviceName,name | of the device. |
key,the | key to be removed. |
Definition at line 614 of file crypto-handlers.cpp.
References crypt_luksRemoveKeyBinary(), error(), SIGNON_LUKS_CIPHER, SIGNON_LUKS_KEY_SIZE, and TRACE.
Referenced by CryptoManager::removeEncryptionKey().