2 RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
4 Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
7 #ifndef _CHAINWALKSET_H
8 #define _CHAINWALKSET_H
14 unsigned char Hash[MAX_HASH_LEN];
15 //int nHashLen; // Implied
16 uint64* pIndexE; // mapStartPosIndexE, Len = nRainbowChainLen - 1
23 virtual ~CChainWalkSet();
26 string m_sHashRoutineName; // Discard all if not match
27 string m_sPlainCharsetName; // Discard all if not match
28 int m_nPlainLenMin; // Discard all if not match
29 int m_nPlainLenMax; // Discard all if not match
30 int m_nRainbowTableIndex; // Discard all if not match
31 int m_nRainbowChainLen; // Discard all if not match
32 list<ChainWalk> m_lChainWalk;
34 string sPrecalcPathName;
36 vector<string> vPrecalcFiles;
40 bool FindInFile(uint64* pIndexE, unsigned char* pHash, int nHashLen);
41 string CheckOrRotatePreCalcFile();
42 void updateUsedPrecalcFiles();
45 uint64* RequestWalk(unsigned char* pHash, int nHashLen,
46 string sHashRoutineName,
47 string sPlainCharsetName, int nPlainLenMin, int nPlainLenMax,
48 int nRainbowTableIndex,
50 bool& fNewlyGenerated,
53 void DiscardWalk(uint64* pIndexE);
54 void StoreToFile(uint64* pIndexE, unsigned char* pHash, int nHashLen);
55 void removePrecalcFiles();