diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-05 18:27:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-05 18:27:53 +0000 |
commit | a4043c72c431d7654b3756d3b5c897751cb8f4f6 (patch) | |
tree | 9f6715f9ec574bf6eeff4360c57ec66bd7da5cec /plugins/Db3x_mmap/src/dbheaders.cpp | |
parent | 369e1612ac567185ada1f899c97fde57b6e3c47c (diff) |
special signature added for the encrypted database
git-svn-id: http://svn.miranda-ng.org/main/trunk@7054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbheaders.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbheaders.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index 5fe77eb0ba..e7f83996a5 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -54,7 +54,8 @@ int CDb3Base::CreateDbHeaders(const DBSignature& _sign) int CDb3Base::CheckDbHeaders()
{
- if (memcmp(m_dbHeader.signature, &dbSignature, sizeof(m_dbHeader.signature)) &&
+ if (memcmp(m_dbHeader.signature, &dbSignatureU, sizeof(m_dbHeader.signature)) &&
+ memcmp(m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature)) &&
memcmp(m_dbHeader.signature, &dbSignatureIM, sizeof(m_dbHeader.signature)) &&
memcmp(m_dbHeader.signature, &dbSignatureSA, sizeof(m_dbHeader.signature)))
return EGROKPRF_UNKHEADER;
@@ -65,5 +66,6 @@ int CDb3Base::CheckDbHeaders() if (m_dbHeader.ofsUser == 0)
return EGROKPRF_DAMAGED;
+ m_bEncrypted = 0 == memcmp(m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature));
return 0;
}
|