aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Elvio Basello2010-08-14 01:38:58 +0000
committerGravatar Elvio Basello2010-08-14 01:38:58 +0000
commit81e7aead300bddb5a05894cb6c22f3970bd7db41 (patch)
tree6112af90808f973d2d5b6b41589c1f8ce91e36cd /src
parentupdate hungarian translation, thanks to Fiber (diff)
downloadKVIrc-81e7aead300bddb5a05894cb6c22f3970bd7db41.tar.gz
KVIrc-81e7aead300bddb5a05894cb6c22f3970bd7db41.tar.bz2
KVIrc-81e7aead300bddb5a05894cb6c22f3970bd7db41.zip
finally fixed translation extraction
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4868 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/kvirc/ui/kvi_cryptcontroller.cpp97
-rw-r--r--src/kvirc/ui/kvi_cryptcontroller.h24
-rw-r--r--src/modules/rijndael/libkvirijndael.cpp75
-rw-r--r--src/modules/rijndael/libkvirijndael_cryptopp.cpp16
4 files changed, 105 insertions, 107 deletions
diff --git a/src/kvirc/ui/kvi_cryptcontroller.cpp b/src/kvirc/ui/kvi_cryptcontroller.cpp
index 1d36e230c..e19a2aac2 100644
--- a/src/kvirc/ui/kvi_cryptcontroller.cpp
+++ b/src/kvirc/ui/kvi_cryptcontroller.cpp
@@ -60,13 +60,13 @@
{
}
- KviCryptController::KviCryptController(QWidget * par,KviWindowToolPageButton* button,const char *,KviWindow * wnd,KviCryptSessionInfo * cur)
- : KviWindowToolWidget(par,button)
+ KviCryptController::KviCryptController(QWidget * pParent, KviWindowToolPageButton * pButton, const char *,KviWindow * pWnd, KviCryptSessionInfo * pInfo)
+ : KviWindowToolWidget(pParent,pButton)
{
// Load the known encryption modules
(void)g_pModuleManager->loadModulesByCaps("crypt");
- m_pWindow = wnd;
+ m_pWindow = pWnd;
setFocusPolicy(Qt::ClickFocus);
@@ -136,15 +136,15 @@
fillEngineList();
- if(cur)
+ if(pInfo)
{
- QListWidgetItem * it = m_pListBox->findItems(QString(cur->szEngineName),Qt::MatchFixedString).first();
- if(it)
+ QListWidgetItem * pItem = m_pListBox->findItems(QString(pInfo->szEngineName),Qt::MatchFixedString).first();
+ if(pItem)
{
m_pEnableCheck->setChecked(true);
- m_pListBox->setCurrentItem(it);
- m_pEnableEncrypt->setChecked(cur->bDoEncrypt);
- m_pEnableDecrypt->setChecked(cur->bDoDecrypt);
+ m_pListBox->setCurrentItem(pItem);
+ m_pEnableEncrypt->setChecked(pInfo->bDoEncrypt);
+ m_pEnableDecrypt->setChecked(pInfo->bDoDecrypt);
} else enableWidgets(false);
} else {
enableWidgets(false);
@@ -171,8 +171,8 @@
KviPointerHashTableIterator<QString,KviCryptEngineDescription> it(*a);
while(it.current())
{
- KviStr modName = it.current()->providerHandle ? ((KviModule *)(it.current()->providerHandle))->name() : "";
- (void)(new KviEngineListBoxItem(m_pListBox,it.current(),modName.ptr()));
+ QString szModName = it.current()->providerHandle ? ((KviModule *)(it.current()->providerHandle))->name() : "";
+ (void)(new KviEngineListBoxItem(m_pListBox,it.current(),szModName.toUtf8().data()));
++it;
}
if(m_pListBox->count() != 0)return;
@@ -185,12 +185,12 @@
if(it)
{
KviEngineListBoxItem * eit = (KviEngineListBoxItem *)it;
- m_pAuthorLabel->setText(eit->m_szAuthor.ptr());
- QString des = "<p>";
- des += eit->m_szDescription.ptr();
- des += "<br><br>";
- des += __tr2qs("If you don't want to encrypt a particular text line then just start it with the CTRL+P prefix");
- m_pDescriptionLabel->setText(des);
+ m_pAuthorLabel->setText(eit->m_szAuthor.toUtf8().data());
+ QString szDesc = "<p>";
+ szDesc += eit->m_szDescription.toUtf8().data();
+ szDesc += "<br><br>";
+ szDesc += __tr2qs("If you don't want to encrypt a particular text line then just start it with the CTRL+P prefix");
+ m_pDescriptionLabel->setText(szDesc);
m_pEnableEncrypt->setEnabled(eit->m_iFlags & KVI_CRYPTENGINE_CAN_ENCRYPT);
m_pEncryptKeyLabel->setEnabled((eit->m_iFlags & KVI_CRYPTENGINE_CAN_ENCRYPT) &&
(eit->m_iFlags & KVI_CRYPTENGINE_WANT_ENCRYPT_KEY));
@@ -257,8 +257,8 @@
m_pSessionInfo = allocateCryptSessionInfo();
// Reregister the module in case that it has been unloaded
// while this dialog was open
- if(m_pLastItem->m_szModuleName.hasData())(void)g_pModuleManager->getModule(m_pLastItem->m_szModuleName.ptr());
- m_pSessionInfo->pEngine = g_pCryptEngineManager->allocateEngine(m_pLastItem->m_szName.ptr());
+ if(!m_pLastItem->m_szModuleName.isEmpty())(void)g_pModuleManager->getModule(m_pLastItem->m_szModuleName.toUtf8().data());
+ m_pSessionInfo->pEngine = g_pCryptEngineManager->allocateEngine(m_pLastItem->m_szName.toUtf8().data());
if(!m_pSessionInfo->pEngine)
{
m_pWindow->output(KVI_OUT_SYSTEMERROR,__tr2qs("Crypt: Can't create an engine instance: crypting disabled"));
@@ -268,11 +268,11 @@
// initialize the engine
if(!initializeEngine(m_pSessionInfo->pEngine))
{
- KviStr errStr = m_pSessionInfo->pEngine->lastError();
+ QString szErrStr = m_pSessionInfo->pEngine->lastError();
g_pCryptEngineManager->deallocateEngine(m_pSessionInfo->pEngine);
delete m_pSessionInfo;
m_pSessionInfo = 0;
- m_pWindow->output(KVI_OUT_SYSTEMERROR,__tr2qs("Crypt: Can't initialize the engine :%s"),errStr.ptr());
+ m_pWindow->output(KVI_OUT_SYSTEMERROR,__tr2qs("Crypt: Can't initialize the engine :%s"),szErrStr.toUtf8().data());
} else {
// ok, engine ready and waiting...
m_pSessionInfo->szEngineName = m_pLastItem->m_szName;
@@ -286,60 +286,61 @@
emit done();
}
- bool KviCryptController::initializeEngine(KviCryptEngine * eng)
+ bool KviCryptController::initializeEngine(KviCryptEngine * pEngine)
{
- KviStr m_szEncryptKey;
- KviStr m_szDecryptKey;
+ KviStr szEncryptKey;
+ KviStr szDecryptKey;
- char * encKey = 0;
- int encKeyLen = 0;
+ char * pcEncKey = 0;
+ char * pcDecKey = 0;
+ int iEncKeyLen = 0;
+ int iDecKeyLen = 0;
if(m_pEnableEncrypt->isChecked())
{
- m_szEncryptKey = m_pEncryptKeyEdit->text();
+ szEncryptKey = m_pEncryptKeyEdit->text();
if(m_pEncryptHexKeyCheck->isChecked())
{
char * tmpKey;
- encKeyLen = m_szEncryptKey.hexToBuffer(&tmpKey,false);
- if(encKeyLen > 0)
+ iEncKeyLen = szEncryptKey.hexToBuffer(&tmpKey,false);
+ if(iEncKeyLen > 0)
{
- encKey = (char *)kvi_malloc(encKeyLen);
- kvi_memmove(encKey,tmpKey,encKeyLen);
+ pcEncKey = (char *)kvi_malloc(iEncKeyLen);
+ kvi_memmove(pcEncKey,tmpKey,iEncKeyLen);
KviStr::freeBuffer(tmpKey);
}
} else {
- encKey = (char *)kvi_malloc(m_szEncryptKey.len());
- kvi_memmove(encKey,m_szEncryptKey.ptr(),m_szEncryptKey.len());
- encKeyLen = m_szEncryptKey.len();
+ pcEncKey = (char *)kvi_malloc(szEncryptKey.len());
+ kvi_memmove(pcEncKey,szEncryptKey.ptr(),szEncryptKey.len());
+ iEncKeyLen = szEncryptKey.len();
}
}
- char * decKey = 0;
- int decKeyLen = 0;
-
if(m_pEnableDecrypt->isChecked())
{
- m_szDecryptKey = m_pDecryptKeyEdit->text();
+ szDecryptKey = m_pDecryptKeyEdit->text();
if(m_pDecryptHexKeyCheck->isChecked())
{
char * tmpKey;
- decKeyLen = m_szDecryptKey.hexToBuffer(&tmpKey,false);
- if(decKeyLen > 0)
+ iDecKeyLen = szDecryptKey.hexToBuffer(&tmpKey,false);
+ if(iDecKeyLen > 0)
{
- decKey = (char *)kvi_malloc(decKeyLen);
- kvi_memmove(decKey,tmpKey,decKeyLen);
+ pcDecKey = (char *)kvi_malloc(iDecKeyLen);
+ kvi_memmove(pcDecKey,tmpKey,iDecKeyLen);
KviStr::freeBuffer(tmpKey);
}
} else {
- decKey = (char *)kvi_malloc(m_szDecryptKey.len());
- kvi_memmove(decKey,m_szDecryptKey.ptr(),m_szDecryptKey.len());
- decKeyLen = m_szDecryptKey.len();
+ pcDecKey = (char *)kvi_malloc(szDecryptKey.len());
+ kvi_memmove(pcDecKey,szDecryptKey.ptr(),szDecryptKey.len());
+ iDecKeyLen = szDecryptKey.len();
}
}
- bool bRet = eng->init(encKey,encKeyLen,decKey,decKeyLen);
- if(encKey)kvi_free(encKey);
- if(decKey)kvi_free(decKey);
+ bool bRet = pEngine->init(pcEncKey,iEncKeyLen,pcDecKey,iDecKeyLen);
+ if(pcEncKey)
+ kvi_free(pcEncKey);
+ if(pcDecKey)
+ kvi_free(pcDecKey);
return bRet;
}
diff --git a/src/kvirc/ui/kvi_cryptcontroller.h b/src/kvirc/ui/kvi_cryptcontroller.h
index bba05cea1..5a517b200 100644
--- a/src/kvirc/ui/kvi_cryptcontroller.h
+++ b/src/kvirc/ui/kvi_cryptcontroller.h
@@ -45,7 +45,7 @@
{
public:
KviCryptEngine * pEngine;
- KviStr szEngineName;
+ QString szEngineName;
bool bDoEncrypt;
bool bDoDecrypt;
};
@@ -57,19 +57,18 @@
KviEngineListBoxItem(KviTalListWidget * lb,KviCryptEngineDescription * d,const char * modName);
~KviEngineListBoxItem();
public:
- KviStr m_szName;
- KviStr m_szAuthor;
- KviStr m_szDescription;
- KviStr m_szModuleName;
- int m_iFlags;
+ QString m_szName;
+ QString m_szAuthor;
+ QString m_szDescription;
+ QString m_szModuleName;
+ int m_iFlags;
};
-
class KVIRC_API KviCryptController : public KviWindowToolWidget
{
Q_OBJECT
public:
- KviCryptController(QWidget * parent,KviWindowToolPageButton* button,const char * name,KviWindow * wnd,KviCryptSessionInfo * cur);
+ KviCryptController(QWidget * pParent, KviWindowToolPageButton * pButton, const char * name,KviWindow * pWnd, KviCryptSessionInfo * pInfo);
~KviCryptController();
protected:
KviWindow * m_pWindow;
@@ -90,23 +89,20 @@
KviCryptSessionInfo * m_pSessionInfo;
private slots:
void enableCheckToggled(bool bChecked);
- void engineHighlighted(QListWidgetItem *it, QListWidgetItem *);
+ void engineHighlighted(QListWidgetItem * pItem, QListWidgetItem *);
void okClicked();
public:
KviCryptSessionInfo * getNewSessionInfo();
static KviCryptSessionInfo * allocateCryptSessionInfo();
- static void destroyCryptSessionInfo(KviCryptSessionInfo ** inf);
+ static void destroyCryptSessionInfo(KviCryptSessionInfo ** ppInfo);
private:
void fillEngineList();
void noEnginesAvailable();
void enableWidgets(bool bEnabled);
- bool initializeEngine(KviCryptEngine * eng);
+ bool initializeEngine(KviCryptEngine * pEngine);
signals:
void done();
};
-
-
#endif //COMPILE_CRYPT_SUPPORT
-
#endif //!_KVI_CRYPTCONTROLLER_H_
diff --git a/src/modules/rijndael/libkvirijndael.cpp b/src/modules/rijndael/libkvirijndael.cpp
index c9bb25569..f399df8ef 100644
--- a/src/modules/rijndael/libkvirijndael.cpp
+++ b/src/modules/rijndael/libkvirijndael.cpp
@@ -112,7 +112,7 @@
encKeyLen = decKeyLen;
} else {
// both keys missing
- setLastError(__tr("Missing both encrypt and decrypt key: at least one is needed"));
+ setLastError(__tr2qs("Missing both encrypt and decrypt key: at least one is needed"));
return false;
}
}
@@ -162,15 +162,15 @@
{
switch(errCode)
{
- case RIJNDAEL_SUCCESS: setLastError(__tr("Error 0: Success ?")); break;
- case RIJNDAEL_UNSUPPORTED_MODE: setLastError(__tr("Unsupported crypt mode")); break;
- case RIJNDAEL_UNSUPPORTED_DIRECTION: setLastError(__tr("Unsupported direction")); break;
- case RIJNDAEL_UNSUPPORTED_KEY_LENGTH: setLastError(__tr("Unsupported key length")); break;
- case RIJNDAEL_BAD_KEY: setLastError(__tr("Bad key data")); break;
- case RIJNDAEL_NOT_INITIALIZED: setLastError(__tr("Engine not initialized")); break;
- case RIJNDAEL_BAD_DIRECTION: setLastError(__tr("Invalid direction for this engine")); break;
- case RIJNDAEL_CORRUPTED_DATA: setLastError(__tr("Corrupted message data or invalid decrypt key")); break;
- default: setLastError(__tr("Unknown error")); break;
+ case RIJNDAEL_SUCCESS: setLastError(__tr2qs("Error 0: Success ?")); break;
+ case RIJNDAEL_UNSUPPORTED_MODE: setLastError(__tr2qs("Unsupported crypt mode")); break;
+ case RIJNDAEL_UNSUPPORTED_DIRECTION: setLastError(__tr2qs("Unsupported direction")); break;
+ case RIJNDAEL_UNSUPPORTED_KEY_LENGTH: setLastError(__tr2qs("Unsupported key length")); break;
+ case RIJNDAEL_BAD_KEY: setLastError(__tr2qs("Bad key data")); break;
+ case RIJNDAEL_NOT_INITIALIZED: setLastError(__tr2qs("Engine not initialized")); break;
+ case RIJNDAEL_BAD_DIRECTION: setLastError(__tr2qs("Invalid direction for this engine")); break;
+ case RIJNDAEL_CORRUPTED_DATA: setLastError(__tr2qs("Corrupted message data or invalid decrypt key")); break;
+ default: setLastError(__tr2qs("Unknown error")); break;
}
}
@@ -178,7 +178,7 @@
{
if(!m_pEncryptCipher)
{
- setLastError(__tr("Ops...encrypt cipher not initialized"));
+ setLastError(__tr2qs("Ops...encrypt cipher not initialized"));
return KviCryptEngine::EncryptError;
}
int len = (int)kvi_strLen(plainText);
@@ -203,7 +203,7 @@
{
if(maxEncryptLen() > 0)
{
- setLastError(__tr("Data buffer too long"));
+ setLastError(__tr2qs("Data buffer too long"));
return KviCryptEngine::EncryptError;
}
}
@@ -215,7 +215,7 @@
{
if(!m_pDecryptCipher)
{
- setLastError(__tr("Ops...decrypt cipher not initialized"));
+ setLastError(__tr2qs("Ops...decrypt cipher not initialized"));
return KviCryptEngine::DecryptError;
}
@@ -271,7 +271,7 @@
*len = hex.hexToBuffer(&tmpBuf,false);
if(*len < 0)
{
- setLastError(__tr("The message is not a hexadecimal string: this is not my stuff"));
+ setLastError(__tr2qs("The message is not a hexadecimal string: this is not my stuff"));
return false;
} else {
if(len > 0)
@@ -297,7 +297,7 @@
*len = base64.base64ToBuffer(&tmpBuf,false);
if(*len < 0)
{
- setLastError(__tr("The message is not a base64 string: this is not my stuff"));
+ setLastError(__tr2qs("The message is not a base64 string: this is not my stuff"));
return false;
} else {
if(len > 0)
@@ -378,7 +378,7 @@
encKeyLen = decKeyLen;
} else {
// both keys missing
- setLastError(__tr("Missing both encrypt and decrypt key: at least one is needed"));
+ setLastError(__tr2qs("Missing both encrypt and decrypt key: at least one is needed"));
return false;
}
}
@@ -411,7 +411,7 @@
{
if(maxEncryptLen() > 0)
{
- setLastError(__tr("Data buffer too long"));
+ setLastError(__tr2qs("Data buffer too long"));
return KviCryptEngine::EncryptError;
}
}
@@ -662,12 +662,12 @@
int len = encoded.base64ToBuffer(&tmpBuf,false);
if(len < 0)
{
- setLastError(__tr("The message is not a base64 string: this is not my stuff"));
+ setLastError(__tr2qs("The message is not a base64 string: this is not my stuff"));
return false;
}
if((len < 8) || (len % 8))
{
- setLastError(__tr("The message doesn't seem to be encoded with CBC Mircryption"));
+ setLastError(__tr2qs("The message doesn't seem to be encoded with CBC Mircryption"));
if(len > 0)KviStr::freeBuffer(tmpBuf);
return false;
}
@@ -703,12 +703,12 @@ static bool rijndael_module_init(KviModule * m)
g_pEngineList = new KviPointerList<KviCryptEngine>;
g_pEngineList->setAutoDelete(false);
- KviStr format = __tr("Cryptographic engine based on the\n" \
+ QString szFormat = __tr2qs("Cryptographic engine based on the\n" \
"Advanced Encryption Standard (AES)\n" \
"algorithm called Rijndael.\n" \
"The text is first encrypted with rijndael\n" \
- "and then converted to %s notation.\n" \
- "The keys used are %d bit long and will be padded\n" \
+ "and then converted to %1 notation.\n" \
+ "The keys used are %2 bit long and will be padded\n" \
"with zeros if you provide shorter ones.\n" \
"If only one key is provided, this engine\n" \
"will use it for both encrypting and decrypting.\n" \
@@ -720,9 +720,9 @@ static bool rijndael_module_init(KviModule * m)
KviCryptEngineDescription * d = new KviCryptEngineDescription;
d->szName = "Rijndael128Hex";
d->szAuthor = "Szymon Stefanek";
- d->szDescription.sprintf(format.ptr(),__tr("hexadecimal"),128);
+ d->szDescription = QString(szFormat).arg(__tr2qs("hexadecimal")).arg(128);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael128HexEngine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -730,9 +730,9 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael192Hex";
d->szAuthor = "Szymon Stefanek";
- d->szDescription.sprintf(format.ptr(),__tr("hexadecimal"),192);
+ d->szDescription = QString(szFormat).arg(__tr2qs("hexadecimal")).arg(192);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael192HexEngine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -740,9 +740,9 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael256Hex";
d->szAuthor = "Szymon Stefanek";
- d->szDescription.sprintf(format.ptr(),__tr("hexadecimal"),256);
+ d->szDescription = QString(szFormat).arg(__tr2qs("hexadecimal")).arg(256);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael256HexEngine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -750,9 +750,9 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael128Base64";
d->szAuthor = "Szymon Stefanek";
- d->szDescription.sprintf(format.ptr(),__tr("base64"),128);
+ d->szDescription = QString(szFormat).arg(__tr2qs("base64")).arg(128);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael128Base64Engine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -760,9 +760,9 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael192Base64";
d->szAuthor = "Szymon Stefanek";
- d->szDescription.sprintf(format.ptr(),__tr("base64"),192);
+ d->szDescription = QString(szFormat).arg(__tr2qs("base64")).arg(192);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael192Base64Engine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -770,9 +770,9 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael256Base64";
d->szAuthor = "Szymon Stefanek";
- d->szDescription.sprintf(format.ptr(),__tr("base64"),256);
+ d->szDescription = QString(szFormat).arg(__tr2qs("base64")).arg(256);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael256Base64Engine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -781,7 +781,7 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Mircryption";
d->szAuthor = "Szymon Stefanek";
- d->szDescription = __tr("Popular cryptographic engine based on the\n" \
+ d->szDescription = __tr2qs("Popular cryptographic engine based on the\n" \
"old Blowfish encryption algorithm.\n" \
"The text is first encrypted with Blowfish \n" \
"and then converted to base64 notation.\n" \
@@ -794,7 +794,7 @@ static bool rijndael_module_init(KviModule * m)
"if you want to use CBC mode you must prefix\n" \
"your key(s) with \"cbc:\".\n");
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
- KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
+ KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocMircryptionEngine;
d->deallocFunc = deallocRijndaelCryptEngine;
m->registerCryptEngine(d);
@@ -809,7 +809,8 @@ static bool rijndael_module_init(KviModule * m)
static bool rijndael_module_cleanup(KviModule *m)
{
#ifdef COMPILE_CRYPT_SUPPORT
- while(g_pEngineList->first())delete g_pEngineList->first();
+ while(g_pEngineList->first())
+ delete g_pEngineList->first();
delete g_pEngineList;
g_pEngineList = 0;
m->unregisterCryptEngines();
diff --git a/src/modules/rijndael/libkvirijndael_cryptopp.cpp b/src/modules/rijndael/libkvirijndael_cryptopp.cpp
index e8101410f..4502da23a 100644
--- a/src/modules/rijndael/libkvirijndael_cryptopp.cpp
+++ b/src/modules/rijndael/libkvirijndael_cryptopp.cpp
@@ -482,8 +482,8 @@ static bool rijndael_module_init(KviModule * m)
"Advanced Encryption Standard (AES)\n" \
"algorithm called Rijndael.\n" \
"The text is first encrypted with Rijndael\n" \
- "and then converted to %s notation.\n" \
- "The keys used are %d bit long and will be padded\n" \
+ "and then converted to %1 notation.\n" \
+ "The keys used are %2 bit long and will be padded\n" \
"with zeros if you provide shorter ones.\n" \
"If only one key is provided, this engine\n" \
"will use it for both encryption and decryption.\n\n" \
@@ -499,7 +499,7 @@ static bool rijndael_module_init(KviModule * m)
KviCryptEngineDescription * d = new KviCryptEngineDescription;
d->szName = "Rijndael128Hex";
d->szAuthor = "Kai Wasserbäch";
- d->szDescription.sprintf(szFormat.toUtf8().data(),__tr2qs("hexadecimal"),128);
+ d->szDescription = QString(szFormat).arg(__tr2qs("hexadecimal")).arg(128);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael128HexEngine;
@@ -509,7 +509,7 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael192Hex";
d->szAuthor = "Kai Wasserbäch";
- d->szDescription.sprintf(szFormat.toUtf8().data(),__tr2qs("hexadecimal"),192);
+ d->szDescription = QString(szFormat).arg(__tr2qs("hexadecimal")).arg(192);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael192HexEngine;
@@ -519,7 +519,7 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael256Hex";
d->szAuthor = "Kai Wasserbäch";
- d->szDescription.sprintf(szFormat.toUtf8().data(),__tr2qs("hexadecimal"),256);
+ d->szDescription = QString(szFormat).arg(__tr2qs("hexadecimal")).arg(256);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael256HexEngine;
@@ -529,7 +529,7 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael128Base64";
d->szAuthor = "Kai Wasserbäch";
- d->szDescription.sprintf(szFormat.toUtf8().data(),__tr2qs("base64"),128);
+ d->szDescription = QString(szFormat).arg(__tr2qs("base64")).arg(128);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael128Base64Engine;
@@ -539,7 +539,7 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael192Base64";
d->szAuthor = "Kai Wasserbäch";
- d->szDescription.sprintf(szFormat.toUtf8().data(),__tr2qs("base64"),192);
+ d->szDescription = QString(szFormat).arg(__tr2qs("base64")).arg(192);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael192Base64Engine;
@@ -549,7 +549,7 @@ static bool rijndael_module_init(KviModule * m)
d = new KviCryptEngineDescription;
d->szName = "Rijndael256Base64";
d->szAuthor = "Kai Wasserbäch";
- d->szDescription.sprintf(szFormat.toUtf8().data(),__tr2qs("base64"),256);
+ d->szDescription = QString(szFormat).arg(__tr2qs("base64")).arg(256);
d->iFlags = KVI_CRYPTENGINE_CAN_ENCRYPT | KVI_CRYPTENGINE_CAN_DECRYPT |
KVI_CRYPTENGINE_WANT_ENCRYPT_KEY | KVI_CRYPTENGINE_WANT_DECRYPT_KEY;
d->allocFunc = allocRijndael256Base64Engine;