X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcipher.h;h=e7f88b38dcb6b4609c9a7a8c7ba75a6bed522356;hp=33a2bf8c95ba1acbaa7898a77d27fc59aae1b8c0;hb=04315f46a16fc3627218377071e008b6b9744992;hpb=393ac8b4bca9db98f297cb4756ef2e79364bf6f0 diff --git a/src/core/cipher.h b/src/core/cipher.h index 33a2bf8c..e7f88b38 100644 --- a/src/core/cipher.h +++ b/src/core/cipher.h @@ -15,17 +15,17 @@ #ifndef CIPHER_H #define CIPHER_H -#include +#include class Cipher { - public: +public: Cipher(); - explicit Cipher(QByteArray key, QString cipherType=QString("blowfish")); + explicit Cipher(QByteArray key, QString cipherType = QString("blowfish")); ~Cipher(); 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); @@ -35,7 +35,7 @@ class Cipher QString type() { return m_type; } static bool neededFeaturesAvailable(); - private: +private: //direction is true for encrypt, false for decrypt QByteArray blowfishCBC(QByteArray cipherText, bool direction); QByteArray blowfishECB(QByteArray cipherText, bool direction); @@ -49,4 +49,6 @@ class Cipher QString m_type; bool m_cbc; }; + + #endif // CIPHER_H