qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
|
Go to the documentation of this file.
38 static bool isEncrypted(
const QByteArray& ciphertext);
39 static QByteArray
encryptPass(
const QString& password,
const QByteArray& plaintext);
40 static QByteArray
decryptPass(
const QString& password,
const QByteArray& ciphertext);
41 static std::unique_ptr<ToxEncrypt>
makeToxEncrypt(
const QString& password);
42 static std::unique_ptr<ToxEncrypt>
makeToxEncrypt(
const QString& password,
43 const QByteArray& toxSave);
44 QByteArray
encrypt(
const QByteArray& plaintext)
const;
45 QByteArray
decrypt(
const QByteArray& ciphertext)
const;
QByteArray encrypt(const QByteArray &plaintext) const
Encrypts the plaintext with the stored key.
~ToxEncrypt()
Frees the passKey before destruction.
static std::unique_ptr< ToxEncrypt > makeToxEncrypt(const QString &password)
Factory method for the ToxEncrypt object.
QByteArray decrypt(const QByteArray &ciphertext) const
Decrypts data encrypted with this module, using the stored key.
static bool isEncrypted(const QByteArray &ciphertext)
Checks if the data was encrypted by this module.
static int getMinBytes()
Gets the minimum number of bytes needed for isEncrypted()
static QByteArray decryptPass(const QString &password, const QByteArray &ciphertext)
Decrypts data encrypted with this module.
Encapsulates the toxencrypsave API. Since key derivation is work intensive and to avoid storing plain...
static QByteArray encryptPass(const QString &password, const QByteArray &plaintext)
Encrypts the plaintext with the given password.
ToxEncrypt & operator=(const ToxEncrypt &other)=delete