summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mmap_SA/security.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-06-23 17:52:37 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-06-23 17:52:37 +0000
commit00c758611455ee1a978d4644a2897dbfa17a420a (patch)
tree3edbe20e1497adf6f672a69837e9e0f70a4fdf07 /plugins/Dbx_mmap_SA/security.cpp
parenteda27f234053df69a304848c91aba90897d7d097 (diff)
Dbx_mmap_SA:
plusified git-svn-id: http://svn.miranda-ng.org/main/trunk@580 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mmap_SA/security.cpp')
-rw-r--r--plugins/Dbx_mmap_SA/security.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/Dbx_mmap_SA/security.cpp b/plugins/Dbx_mmap_SA/security.cpp
index f4b9b06004..bce6a55843 100644
--- a/plugins/Dbx_mmap_SA/security.cpp
+++ b/plugins/Dbx_mmap_SA/security.cpp
@@ -5,10 +5,6 @@
BOOL bEncoding;
BOOL bEncProcess = 0;
-extern HINSTANCE g_hInst;
-
-extern HANDLE hSetPwdMenu = NULL;
-
char encryptKey[255];
size_t encryptKeyLength;
@@ -91,7 +87,7 @@ void EncodeCopyMemory(void * dst, void * src, size_t size )
if (!bEncoding)
return;
- CryptoEngine->EncryptMem(dst, (int)size, key);
+ CryptoEngine->EncryptMem((BYTE *)dst, (int)size, key);
}
void DecodeCopyMemory(void * dst, void * src, size_t size )
@@ -101,7 +97,7 @@ void DecodeCopyMemory(void * dst, void * src, size_t size )
if (!bEncoding)
return;
- CryptoEngine->DecryptMem(dst, (int)size, key);
+ CryptoEngine->DecryptMem((BYTE *)dst, (int)size, key);
}
void EncodeDBWrite(DWORD ofs, void * src, size_t size)
@@ -346,7 +342,7 @@ void DecryptDB()
bEncoding = 0;
- zero_fill(encryptKey, sizeof encryptKey);
+ zero_fill((BYTE *)encryptKey, sizeof encryptKey);
xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
@@ -400,7 +396,7 @@ void ChangePwd()
CryptoEngine = NULL;
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
- zero_fill(encryptKey, sizeof encryptKey);
+ zero_fill((BYTE *)encryptKey, sizeof encryptKey);
xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
}
@@ -418,7 +414,7 @@ void ChangePwd()
WriteCryptHeader();
}
- zero_fill(newpass, sizeof newpass);
+ zero_fill((BYTE *)newpass, sizeof newpass);
LeaveCriticalSection(&csDbAccess);
} \ No newline at end of file