Messagelib
7 #include "dkimkeyrecord.h"
8 #include "messageviewer_dkimcheckerdebug.h"
10 using namespace MessageViewer;
12 DKIMKeyRecord::DKIMKeyRecord() =
default;
14 bool DKIMKeyRecord::parseKey(
const QString &key)
16 qDebug() <<
" key " << key;
19 qCWarning(MESSAGEVIEWER_DKIMCHECKER_LOG) <<
"Error: trying to parse empty key";
24 for (
int i = 0; i < items.
count(); ++i) {
25 const QString elem = items.
at(i).trimmed();
44 for (
const QString &service : lst) {
68 mVersion = QStringLiteral(
"DKIM1");
71 mKeyType = QStringLiteral(
"rsa");
79 QString DKIMKeyRecord::version()
const
84 void DKIMKeyRecord::setVersion(
const QString &version)
89 QString DKIMKeyRecord::keyType()
const
94 void DKIMKeyRecord::setKeyType(
const QString &keyType)
99 QString DKIMKeyRecord::note()
const
104 void DKIMKeyRecord::setNote(
const QString ¬e)
109 QString DKIMKeyRecord::publicKey()
const
114 void DKIMKeyRecord::setPublicKey(
const QString &publicKey)
116 mPublicKey = publicKey;
119 QString DKIMKeyRecord::service()
const
124 void DKIMKeyRecord::setService(
const QString &service)
134 void DKIMKeyRecord::setFlags(
const QStringList &flags)
139 bool DKIMKeyRecord::operator==(
const DKIMKeyRecord &other)
const
141 return mVersion == other.version() && mNote == other.note() && mPublicKey == other.publicKey() && mService == other.service()
142 && mHashAlgorithm == other.hashAlgorithm() && mFlags == other.flags();
147 return mHashAlgorithm;
150 void DKIMKeyRecord::setHashAlgorithm(
const QStringList &hashAlgorithm)
152 mHashAlgorithm = hashAlgorithm;
157 d <<
"mVersion " << t.version();
158 d <<
"mKeyType " << t.keyType();
159 d <<
"mNote " << t.note();
160 d <<
"mPublicKey " << t.publicKey();
161 d <<
"mService " << t.service();
162 d <<
"mHashAlgorithm " << t.hashAlgorithm();
163 d <<
"mFlags " << t.flags();
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
int count(const T &value) const const
bool isEmpty() const const
const T & at(int i) const const
QString & replace(int position, int n, QChar after)
QString & remove(int position, int n)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
KDB_EXPORT KDbVersionInfo version()
QString right(int n) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:57:06 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.