Warning, file /include/QtCore/qmessageauthenticationcode.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QMESSAGEAUTHENTICATIONCODE_H
0005 #define QMESSAGEAUTHENTICATIONCODE_H
0006
0007 #include <QtCore/qcryptographichash.h>
0008
0009 QT_BEGIN_NAMESPACE
0010
0011
0012 class QMessageAuthenticationCodePrivate;
0013 class QIODevice;
0014
0015
0016 class Q_CORE_EXPORT QMessageAuthenticationCode
0017 {
0018 public:
0019 #if QT_CORE_REMOVED_SINCE(6, 6)
0020 explicit QMessageAuthenticationCode(QCryptographicHash::Algorithm method,
0021 const QByteArray &key);
0022 #endif
0023 explicit QMessageAuthenticationCode(QCryptographicHash::Algorithm method,
0024 QByteArrayView key = {});
0025
0026 QMessageAuthenticationCode(QMessageAuthenticationCode &&other) noexcept
0027 : d{std::exchange(other.d, nullptr)} {}
0028 ~QMessageAuthenticationCode();
0029
0030 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QMessageAuthenticationCode)
0031 void swap(QMessageAuthenticationCode &other) noexcept
0032 { qt_ptr_swap(d, other.d); }
0033
0034 void reset() noexcept;
0035
0036 #if QT_CORE_REMOVED_SINCE(6, 6)
0037 void setKey(const QByteArray &key);
0038 #endif
0039 void setKey(QByteArrayView key) noexcept;
0040
0041 void addData(const char *data, qsizetype length);
0042 #if QT_CORE_REMOVED_SINCE(6, 6)
0043 void addData(const QByteArray &data);
0044 #endif
0045 void addData(QByteArrayView data) noexcept;
0046 bool addData(QIODevice *device);
0047
0048 QByteArrayView resultView() const noexcept;
0049 QByteArray result() const;
0050
0051 #if QT_CORE_REMOVED_SINCE(6, 6)
0052 static QByteArray hash(const QByteArray &message, const QByteArray &key,
0053 QCryptographicHash::Algorithm method);
0054 #endif
0055 static QByteArray hash(QByteArrayView message, QByteArrayView key,
0056 QCryptographicHash::Algorithm method);
0057
0058 private:
0059 Q_DISABLE_COPY(QMessageAuthenticationCode)
0060 QMessageAuthenticationCodePrivate *d;
0061 };
0062
0063 QT_END_NAMESPACE
0064
0065 #endif