2 * rcracki_mt is a multithreaded implementation and fork of the original
5 * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
6 * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>
7 * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>
8 * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
10 * This file is part of rcracki_mt.
12 * rcracki_mt is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 2 of the License, or
15 * (at your option) any later version.
17 * rcracki_mt is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with rcracki_mt. If not, see <http://www.gnu.org/licenses/>.
26 #ifndef _CHAINWALKSET_H
27 #define _CHAINWALKSET_H
33 unsigned char Hash[MAX_HASH_LEN];
34 //int nHashLen; // Implied
35 uint64* pIndexE; // mapStartPosIndexE, Len = nRainbowChainLen - 1
42 virtual ~CChainWalkSet();
45 string m_sHashRoutineName; // Discard all if not match
46 string m_sPlainCharsetName; // Discard all if not match
47 int m_nPlainLenMin; // Discard all if not match
48 int m_nPlainLenMax; // Discard all if not match
49 int m_nRainbowTableIndex; // Discard all if not match
50 int m_nRainbowChainLen; // Discard all if not match
51 list<ChainWalk> m_lChainWalk;
53 string sPrecalcPathName;
55 vector<string> vPrecalcFiles;
59 bool FindInFile(uint64* pIndexE, unsigned char* pHash, int nHashLen);
60 string CheckOrRotatePreCalcFile();
61 void updateUsedPrecalcFiles();
64 uint64* RequestWalk(unsigned char* pHash, int nHashLen,
65 string sHashRoutineName,
66 string sPlainCharsetName, int nPlainLenMin, int nPlainLenMax,
67 int nRainbowTableIndex,
69 bool& fNewlyGenerated,
72 void DiscardWalk(uint64* pIndexE);
73 void StoreToFile(uint64* pIndexE, unsigned char* pHash, int nHashLen);
74 void removePrecalcFiles();