X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcipher.h;fp=src%2Fcore%2Fcipher.h;h=01cf9ddc60656d51e1926f880f94c3cbfebd6a3f;hp=e873ff7d972491ffaa63ef82000927b9738bd7c2;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=30b159cb876a9495de42e9a3e70ca050516f0805 diff --git a/src/core/cipher.h b/src/core/cipher.h index e873ff7d..01cf9ddc 100644 --- a/src/core/cipher.h +++ b/src/core/cipher.h @@ -24,19 +24,19 @@ public: explicit Cipher(QByteArray key, QString cipherType = QString("blowfish")); QByteArray decrypt(QByteArray cipher); QByteArray decryptTopic(QByteArray cipher); - bool encrypt(QByteArray &cipher); + bool encrypt(QByteArray& cipher); QByteArray initKeyExchange(); QByteArray parseInitKeyX(QByteArray key); bool parseFinishKeyX(QByteArray key); bool setKey(QByteArray key); QByteArray key() { return m_key; } - bool setType(const QString &type); + bool setType(const QString& type); QString type() { return m_type; } static bool neededFeaturesAvailable(); inline bool usesCBC() { return m_cbc; } private: - //direction is true for encrypt, false for decrypt + // direction is true for encrypt, false for decrypt QByteArray blowfishCBC(QByteArray cipherText, bool direction); QByteArray blowfishECB(QByteArray cipherText, bool direction); QByteArray b64ToByte(QByteArray text); @@ -50,5 +50,4 @@ private: bool m_cbc; }; - -#endif // CIPHER_H +#endif // CIPHER_H