diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-13 14:33:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-13 14:33:33 +0000 |
commit | 6d7087f75d1c08474e69ae4325afd0b661d71c1e (patch) | |
tree | 210725701e344187abde5e8b969b14c06d69b24a /plugins/Db3x_mmap/src/dbcrypt.cpp | |
parent | 22ae5f6a0f193c001185374c71c10495cbbd7df5 (diff) |
ability to detect whether a setting is encrypted or not
git-svn-id: http://svn.miranda-ng.org/main/trunk@7629 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcrypt.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbcrypt.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index 922e7c006b..8af1b93b2f 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////////////////
-bool isEncrypted(LPCSTR szModule, LPCSTR szSetting);
-
//VERY VERY VERY BASIC ENCRYPTION FUNCTION
static void Encrypt(char *msg, BOOL up)
@@ -74,7 +72,7 @@ struct SettingUgraderParam int sttSettingUgrader(const char *szSetting, LPARAM lParam)
{
SettingUgraderParam *param = (SettingUgraderParam*)lParam;
- if (isEncrypted(param->szModule, szSetting)) {
+ if (param->db->IsSettingEncrypted(param->szModule, szSetting)) {
DBVARIANT dbv = { DBVT_UTF8 };
DBCONTACTGETSETTING dbcgs = { param->szModule, szSetting, &dbv };
if (!param->db->GetContactSettingStr(param->hContact, &dbcgs)) {
@@ -326,7 +324,7 @@ void CDb3Mmap::ToggleSettingsEncryption(HANDLE hContact) case DBVT_ENCRYPTED:
len = *(PWORD)(pBlob + 1);
// we need to decrypt these strings
- if (m_bEncrypted && !::isEncrypted(szModule, szSetting))
+ if (m_bEncrypted && !IsSettingEncrypted(szModule, szSetting))
arSettings.insert(new VarDescr(szSetting, pBlob + 3, len));
NeedBytes(3 + len);
break;
|