6 #include <QStringBuilder>
8 #include "simplecrypt/simplecrypt.h"
16 SimpleCrypt simpleCrypt(Key);
17 const QString decoded = simpleCrypt.decryptToString(inString.
mid(
prefix().length()));
18 return trimmed ? decoded.
trimmed() : decoded;
23 SimpleCrypt simpleCrypt(Key);
24 const QString encrypted = simpleCrypt.encryptToString(trimmed ? inString.
trimmed() : inString);
25 return prefix() % encrypted;
30 static const QString obfuscated(
"OBF:");
static QString decode(const QString &inString, bool trimmed=true)
Decode string if it has the prefix, otherwise do nothing with it.
static const QString & prefix()
Prefix to be used with obfuscated string.
static QString encode(const QString &inString, bool trimmed=true)
Encode string and return with prefix.
Free functions in swift::misc.
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) &&
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QString trimmed() const const