diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-12-03 18:03:47 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-12-03 18:03:47 +0000 |
commit | 9058a0873878d4767f0ab43b55f397ed3290d8ed (patch) | |
tree | 8c84e1db1114ae8b865cb2ca85ff2d35e0256619 /Dbx_mmap_SA/security.c | |
parent | 534fea9b2d46ddbe51b3841f2ca6af2e468f5c00 (diff) |
Dbx_mmap_SA:
removed not needed ansi code
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@238 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'Dbx_mmap_SA/security.c')
-rw-r--r-- | Dbx_mmap_SA/security.c | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/Dbx_mmap_SA/security.c b/Dbx_mmap_SA/security.c index 50e4665..92a82a4 100644 --- a/Dbx_mmap_SA/security.c +++ b/Dbx_mmap_SA/security.c @@ -8,8 +8,6 @@ BOOL bEncProcess = 0; extern HINSTANCE g_hInst;
extern HANDLE hSetPwdMenu = NULL;
-extern BOOL gl_bUnicodeAwareCore;
-
char encryptKey[255];
size_t encryptKeyLength;
@@ -197,23 +195,15 @@ int SelectEncoder() int i;
if(ModulesCount == 0){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("Crypto modules not found"), TranslateT("Error"), MB_OK);
- else
- MessageBoxA(0, Translate("Crypto modules not found"), Translate("Error"), MB_OK);
+ MessageBox(0, TranslateT("Crypto modules not found"), TranslateT("Error"), MB_OK);
return 1;
}
uid = DBGetContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
if(uid == 0){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
- else
- MessageBoxA(0, Translate("Crypto module hasn't been chosen, using first one found"), Translate("Notice"), MB_OK);
-
+ MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[0]->cryptor->uid);
-
CryptoEngine = Modules[0]->cryptor;
}
else{
@@ -226,13 +216,8 @@ int SelectEncoder() }
}
if(!Found){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
- else
- MessageBoxA(0, Translate("Crypto module hasn't been chosen, using first one found"), Translate("Notice"), MB_OK);
-
+ MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[0]->cryptor->uid);
-
CryptoEngine = Modules[0]->cryptor;
}
}
@@ -313,10 +298,7 @@ void EncryptDB() if(bEncProcess) return;
if(memcmp(dbHeader.signature, &dbSignatureSecured, sizeof(dbHeader.signature)) == 0){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("DB is already secured!"), TranslateT("Error"), MB_OK);
- else
- MessageBoxA(0, Translate("DB is already secured!"), Translate("Error"), MB_OK);
+ MessageBox(0, TranslateT("DB is already secured!"), TranslateT("Error"), MB_OK);
return;
}
@@ -344,10 +326,7 @@ void EncryptDB() WriteCryptHeader();
- if (gl_bUnicodeAwareCore)
- xModifyMenu(hSetPwdMenu, 0, LPGENT("Change Password"), 0);
- else
- xModifyMenu(hSetPwdMenu, 0, (TCHAR*) LPGEN ("Change Password"), 0); //ugly hack
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Change Password"), 0);
bEncProcess = 0;
}
@@ -369,10 +348,7 @@ void DecryptDB() zero_fill(encryptKey, sizeof encryptKey);
- if (gl_bUnicodeAwareCore)
- xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
- else
- xModifyMenu(hSetPwdMenu, 0, (TCHAR*) LPGEN("Set Password"), 0); //ugly hack
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
@@ -426,10 +402,7 @@ void ChangePwd() zero_fill(encryptKey, sizeof encryptKey);
- if (gl_bUnicodeAwareCore)
- xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
- else
- xModifyMenu(hSetPwdMenu, 0, (TCHAR*) LPGEN("Set Password"), 0); //ugly hack
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
}
if(action == IDOK){
|