projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clang-tidy: Reorder NetworkMO attributes to avoid excessive padding
[quassel.git]
/
src
/
core
/
cipher.cpp
diff --git
a/src/core/cipher.cpp
b/src/core/cipher.cpp
index
a8232a3
..
88a4c50
100644
(file)
--- a/
src/core/cipher.cpp
+++ b/
src/core/cipher.cpp
@@
-13,7
+13,7
@@
*/
#include "cipher.h"
*/
#include "cipher.h"
-#include "log
ger
.h"
+#include "log
message
.h"
Cipher::Cipher()
{
Cipher::Cipher()
{
@@
-56,7
+56,8
@@
bool Cipher::setKey(QByteArray key)
// if(Preferences::self()->encryptionType())
// m_cbc = true;
// else
// if(Preferences::self()->encryptionType())
// m_cbc = true;
// else
- m_cbc = false;
+// default to CBC
+ m_cbc = true;
m_key = key;
}
return true;
m_key = key;
}
return true;
@@
-117,7
+118,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))
{
// (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)
temp = blowfishCBC(cipherText, false);
if (temp == cipherText)