*/
#include "cipher.h"
-#include "logger.h"
+#include "logmessage.h"
Cipher::Cipher()
{
// if(Preferences::self()->encryptionType())
// m_cbc = true;
// else
- m_cbc = false;
+// default to CBC
+ m_cbc = true;
m_key = key;
}
return true;
// (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)
right += v;
for (int i = 0; i < 6; i++) {
- encoded.append(base64.at(right & 0x3F).toAscii());
+ encoded.append(base64.at(right & 0x3F).toLatin1());
right = right >> 6;
}
- //TODO make sure the .toascii doesn't break anything
+ //TODO make sure the .toLatin1 doesn't break anything
for (int i = 0; i < 6; i++) {
- encoded.append(base64.at(left & 0x3F).toAscii());
+ encoded.append(base64.at(left & 0x3F).toLatin1());
left = left >> 6;
}
}