summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mmap_SA/security.cpp
diff options
context:
space:
mode:
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