]> git.sesse.net Git - freerainbowtables/blob - Client Applications/rcracki_mt/HashSet.h
distrrtgen fixes for integrating charset into distrrtgen.exe
[freerainbowtables] / Client Applications / rcracki_mt / HashSet.h
1 /*
2  * rcracki_mt is a multithreaded implementation and fork of the original 
3  * RainbowCrack
4  *
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>
9  *
10  * This file is part of rcracki_mt.
11  *
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.
16  *
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.
21  *
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/>.
24  */
25
26 #ifndef _HASHSET_H
27 #define _HASHSET_H
28
29 #include "Public.h"
30
31 class CHashSet
32 {
33 public:
34         CHashSet();
35         virtual ~CHashSet();
36
37 private:
38         vector<string> m_vHash;
39         vector<bool>   m_vFound;
40         vector<string> m_vPlain;
41         vector<string> m_vBinary;
42
43 public:
44         void AddHash(string sHash);             // lowercase, len % 2 == 0, MIN_HASH_LEN * 2 <= len <= MAX_HASH_LEN * 2
45         bool AnyhashLeft();
46         bool AnyHashLeftWithLen(int nLen);
47         void GetLeftHashWithLen(vector<string>& vHash, int nLen);
48         
49         void SetPlain(string sHash, string sPlain, string sBinary);
50         bool GetPlain(string sHash, string& sPlain, string& sBinary);
51
52         int GetStatHashFound();
53         int GetStatHashTotal();
54
55         string GetHashInfo(int i);
56         void AddHashInfo(string sHash, bool found, string sPlain, string sBinary);
57 };
58
59 #endif