signon  8.42
crypto-handlers.cpp File Reference
#include <sys/mount.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <libcryptsetup.h>
#include <QDataStream>
#include <QTextStream>
#include <QProcess>
#include <QLatin1Char>
#include <QFileInfo>
#include <QDir>
#include "crypto-handlers.h"
#include "debug.h"
#include "misc.h"
Include dependency graph for crypto-handlers.cpp:

Go to the source code of this file.

Macros

#define SIGNON_LUKS_DEFAULT_HASH   "ripemd160"
#define SIGNON_LUKS_CIPHER_NAME   "aes"
#define SIGNON_LUKS_CIPHER_MODE   "xts-plain"
#define SIGNON_LUKS_CIPHER   SIGNON_LUKS_CIPHER_NAME "-" SIGNON_LUKS_CIPHER_MODE
#define SIGNON_LUKS_KEY_SIZE   256
#define SIGNON_LUKS_BASE_KEYSLOT   0
#define SIGNON_EXTERNAL_PROCESS_READ_TIMEOUT   300
#define KILO_BYTE_SIZE   1024
#define MEGA_BYTE_SIZE   (KILO_BYTE_SIZE * 1024)

Functions

int crypt_luksFormatBinary (struct crypt_options *options, const char *pwd, unsigned int pwdLen)
int crypt_luksOpenBinary (struct crypt_options *options, const char *pwd, unsigned int pwdLen)
int crypt_luksAddKeyBinary (struct crypt_options *options, const char *pwd, unsigned int pwdLen, const char *newPwd, unsigned int newPwdLen)
int crypt_luksRemoveKeyBinary (struct crypt_options *options, const char *pwdToRemove, unsigned int pwdToRemoveLen)

Macro Definition Documentation

#define KILO_BYTE_SIZE   1024

Definition at line 53 of file crypto-handlers.cpp.

#define MEGA_BYTE_SIZE   (KILO_BYTE_SIZE * 1024)

Definition at line 54 of file crypto-handlers.cpp.

Referenced by PartitionHandler::createPartitionFile().

#define SIGNON_EXTERNAL_PROCESS_READ_TIMEOUT   300

Definition at line 51 of file crypto-handlers.cpp.

Referenced by SystemCommandLineCallHandler::makeCall().

#define SIGNON_LUKS_BASE_KEYSLOT   0

Definition at line 49 of file crypto-handlers.cpp.

Referenced by CryptsetupHandler::formatFile().

#define SIGNON_LUKS_CIPHER_MODE   "xts-plain"

Definition at line 45 of file crypto-handlers.cpp.

Referenced by crypt_luksFormatBinary().

#define SIGNON_LUKS_CIPHER_NAME   "aes"

Definition at line 44 of file crypto-handlers.cpp.

Referenced by crypt_luksFormatBinary().

#define SIGNON_LUKS_DEFAULT_HASH   "ripemd160"

Definition at line 42 of file crypto-handlers.cpp.

#define SIGNON_LUKS_KEY_SIZE   256

Function Documentation

int crypt_luksAddKeyBinary ( struct crypt_options *  options,
const char *  pwd,
unsigned int  pwdLen,
const char *  newPwd,
unsigned int  newPwdLen 
)

Definition at line 499 of file crypto-handlers.cpp.

Referenced by CryptsetupHandler::addKeySlot().

int crypt_luksFormatBinary ( struct crypt_options *  options,
const char *  pwd,
unsigned int  pwdLen 
)

Definition at line 275 of file crypto-handlers.cpp.

References SIGNON_LUKS_CIPHER_MODE, and SIGNON_LUKS_CIPHER_NAME.

Referenced by CryptsetupHandler::formatFile().

int crypt_luksOpenBinary ( struct crypt_options *  options,
const char *  pwd,
unsigned int  pwdLen 
)

Definition at line 363 of file crypto-handlers.cpp.

Referenced by CryptsetupHandler::openFile().

int crypt_luksRemoveKeyBinary ( struct crypt_options *  options,
const char *  pwdToRemove,
unsigned int  pwdToRemoveLen 
)

Definition at line 576 of file crypto-handlers.cpp.

Referenced by CryptsetupHandler::removeKeySlot().