legacy impl for old CustomIconMS format

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@99 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tarek_saidi
2006-06-23 20:45:06 +00:00
parent 5775eaae36
commit 950488ece3
5 changed files with 17 additions and 5 deletions

View File

@@ -248,9 +248,8 @@ bool PwDatabase::parseMetaStream(const CEntry& entry){
if(entry.Additional=="KPX_CUSTOM_ICONS_2")
return parseCustomIconsMetaStream(entry.BinaryData);
/* Old stream format will be ignored*/
if(entry.Additional=="KPX_CUSTOM_ICONS")
return true; //return true to avoid that this stream get saved
return parseCustomIconsMetaStreamV1(entry.BinaryData);
return false; //unknown MetaStream
}
@@ -261,6 +260,15 @@ CEntry* PwDatabase::getEntry(const KpxUuid& uuid){
return NULL;
}
/* legacy function */
bool PwDatabase::parseCustomIconsMetaStreamV1(const QByteArray& dta){
return true;
}
bool PwDatabase::parseCustomIconsMetaStream(const QByteArray& dta){
quint32 NumIcons,NumEntries,NumGroups,offset;
memcpyFromLEnd32(&NumIcons,dta.data());

View File

@@ -93,6 +93,7 @@ private:
bool IsMetaStream(CEntry& Entry);
bool parseMetaStream(const CEntry& Entry);
bool parseCustomIconsMetaStream(const QByteArray& data);
bool parseCustomIconsMetaStreamV1(const QByteArray& data);
void createCustomIconsMetaStream(CEntry* dst);
void transformKey(quint8* src,quint8* dst,quint8* seed,int rounds);
bool readHeader(char* raw);

View File

@@ -26,7 +26,7 @@
#include <QColor>
#include <QIcon>
#define KEEPASS_VERSION "0.2.1"
#define KEEPASS_VERSION "0.2.2"
#define BUILTIN_ICONS 62
typedef enum tKeyType {PASSWORD=0,KEYFILE=1,BOTH=2};