X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcipher.cpp;h=c5a40c21439e0b08363adc85b73207fdd88b4890;hp=a8232a3c1fc29b338fb214d22aa823398e2c9f0f;hb=8f2ee00f4edef1693628d3af0bdee84d725eb754;hpb=90803b4288736e6c53d50eeb4fbbe2525be968c3 diff --git a/src/core/cipher.cpp b/src/core/cipher.cpp index a8232a3c..c5a40c21 100644 --- a/src/core/cipher.cpp +++ b/src/core/cipher.cpp @@ -13,7 +13,7 @@ */ #include "cipher.h" -#include "logger.h" +#include "logmessage.h" Cipher::Cipher() { @@ -30,9 +30,6 @@ Cipher::Cipher(QByteArray key, QString cipherType) } -Cipher::~Cipher() -{} - bool Cipher::setKey(QByteArray key) { if (key.isEmpty()) { @@ -56,7 +53,8 @@ bool Cipher::setKey(QByteArray key) // if(Preferences::self()->encryptionType()) // m_cbc = true; // else - m_cbc = false; +// default to CBC + m_cbc = true; m_key = key; } return true; @@ -117,7 +115,6 @@ QByteArray Cipher::decrypt(QByteArray cipherText) // (if cbc and no error we parse cbc) || (if ecb and error we parse cbc) if ((m_cbc && !error) || (!m_cbc && error)) { - cipherText = cipherText; temp = blowfishCBC(cipherText, false); if (temp == cipherText)