28 #ifndef dooble_cryptography_h 29 #define dooble_cryptography_h 40 static int s_authentication_key_length;
41 static int s_encryption_key_length;
43 const QByteArray &encryption_key,
44 const QString &block_cipher_type);
47 QByteArray encrypt_then_mac(
const QByteArray &data)
const;
48 QByteArray hmac(
const QByteArray &message)
const;
49 QByteArray hmac(
const QString &message)
const;
50 QByteArray mac_then_decrypt(
const QByteArray &data)
const;
51 QPair<QByteArray, QByteArray> keys(
void)
const;
52 bool as_plaintext(
void)
const;
53 bool authenticated(
void)
const;
54 static bool memcmp(
const QByteArray &a,
const QByteArray &b);
55 static void memzero(QByteArray &bytes);
56 static void memzero(QString &text);
57 void authenticate(
const QByteArray &salt,
58 const QByteArray &salted_password,
59 const QString &password);
60 void set_authenticated(
bool state);
61 void set_block_cipher_type(
const QString &block_cipher_type);
62 void set_keys(
const QByteArray &authentication_key,
63 const QByteArray &encryption_key);
66 QByteArray m_authentication_key;
67 QByteArray m_encryption_key;
68 QString m_block_cipher_type;
Definition: dooble_cryptography.h:35