6#ifndef QXMPPENCRYPTEDFILESOURCE_H
7#define QXMPPENCRYPTEDFILESOURCE_H
9#include "QXmppGlobal.h"
11#include "QXmppHttpFileSource.h"
13#include <QSharedDataPointer>
17class QXmppEncryptedFileSourcePrivate;
20class QXMPP_EXPORT QXmppEncryptedFileSource
23 QXmppEncryptedFileSource();
24 QXMPP_PRIVATE_DECLARE_RULE_OF_SIX(QXmppEncryptedFileSource)
29 const QByteArray &
key()
const;
30 void setKey(
const QByteArray &newKey);
32 const QByteArray &
iv()
const;
33 void setIv(
const QByteArray &newIv);
35 const QVector<QXmppHash> &
hashes()
const;
36 void setHashes(
const QVector<QXmppHash> &newHashes);
38 const QVector<QXmppHttpFileSource> &
httpSources()
const;
39 void setHttpSources(
const QVector<QXmppHttpFileSource> &newHttpSources);
42 static constexpr std::tuple XmlTag = { u
"encrypted", QXmpp::Private::ns_esfs };
43 bool parse(
const QDomElement &el);
44 void toXml(QXmlStreamWriter *writer)
const;
48 QSharedDataPointer<QXmppEncryptedFileSourcePrivate> d;
QXmpp::Cipher cipher() const
Returns the cipher that was used to encrypt the data in this file source.
Definition QXmppEncryptedFileSource.cpp:59
void setKey(const QByteArray &newKey)
Sets the key that was used to encrypt the data in this file source.
Definition QXmppEncryptedFileSource.cpp:77
void setCipher(QXmpp::Cipher newCipher)
Sets the cipher that was used to encrypt the data in this file source.
Definition QXmppEncryptedFileSource.cpp:65
void setIv(const QByteArray &newIv)
Sets the initialization vector that was used to encrypt the data in this file source.
Definition QXmppEncryptedFileSource.cpp:89
const QByteArray & iv() const
Returns the Initialization vector that can be used to decrypt the data in this file source.
Definition QXmppEncryptedFileSource.cpp:83
const QByteArray & key() const
Returns the key that can be used to decrypt the data in this file source.
Definition QXmppEncryptedFileSource.cpp:71
const QVector< QXmppHttpFileSource > & httpSources() const
Returns the http sources that can be used to retrieve the encrypted data.
Definition QXmppEncryptedFileSource.cpp:107
void setHashes(const QVector< QXmppHash > &newHashes)
Sets the hashes of the file contained in this file source.
Definition QXmppEncryptedFileSource.cpp:101
void setHttpSources(const QVector< QXmppHttpFileSource > &newHttpSources)
Sets the http sources containing the encrypted data.
Definition QXmppEncryptedFileSource.cpp:113
const QVector< QXmppHash > & hashes() const
Returns the hashes of the file contained in this file source.
Definition QXmppEncryptedFileSource.cpp:95
Cipher
Definition QXmppGlobal.h:172