]> git.sesse.net Git - freerainbowtables/blob - Client Applications/rcracki_mt/HashSet.h
backport rcracki_mt trunk from rcracki.sourceforge.net
[freerainbowtables] / Client Applications / rcracki_mt / HashSet.h
1 /*\r
2  * rcracki_mt is a multithreaded implementation and fork of the original \r
3  * RainbowCrack\r
4  *\r
5  * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>\r
6  * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>\r
7  * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>\r
8  * Copyright 2009, 2010 James Nobis <frt@quelrod.net>\r
9  *\r
10  * This file is part of rcracki_mt.\r
11  *\r
12  * rcracki_mt is free software: you can redistribute it and/or modify\r
13  * it under the terms of the GNU General Public License as published by\r
14  * the Free Software Foundation, either version 2 of the License, or\r
15  * (at your option) any later version.\r
16  *\r
17  * rcracki_mt is distributed in the hope that it will be useful,\r
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
20  * GNU General Public License for more details.\r
21  *\r
22  * You should have received a copy of the GNU General Public License\r
23  * along with rcracki_mt.  If not, see <http://www.gnu.org/licenses/>.\r
24  */\r
25 \r
26 #ifndef _HASHSET_H\r
27 #define _HASHSET_H\r
28 \r
29 #include "Public.h"\r
30 \r
31 class CHashSet\r
32 {\r
33 public:\r
34         CHashSet();\r
35         virtual ~CHashSet();\r
36 \r
37 private:\r
38         vector<string> m_vHash;\r
39         vector<bool>   m_vFound;\r
40         vector<string> m_vPlain;\r
41         vector<string> m_vBinary;\r
42 \r
43 public:\r
44         void AddHash(string sHash);             // lowercase, len % 2 == 0, MIN_HASH_LEN * 2 <= len <= MAX_HASH_LEN * 2\r
45         bool AnyhashLeft();\r
46         bool AnyHashLeftWithLen(int nLen);\r
47         void GetLeftHashWithLen(vector<string>& vHash, int nLen);\r
48         \r
49         void SetPlain(string sHash, string sPlain, string sBinary);\r
50         bool GetPlain(string sHash, string& sPlain, string& sBinary);\r
51 \r
52         int GetStatHashFound();\r
53         int GetStatHashTotal();\r
54 \r
55         string GetHashInfo(int i);\r
56         void AddHashInfo(string sHash, bool found, string sPlain, string sBinary);\r
57 };\r
58 \r
59 #endif\r