-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathHashSet.h
37 lines (28 loc) · 825 Bytes
/
HashSet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
Copyright (C) Zhu Shuanglei <[email protected]>
*/
#ifndef _HASHSET_H
#define _HASHSET_H
#include "Public.h"
class CHashSet
{
public:
CHashSet();
virtual ~CHashSet();
private:
vector<string> m_vHash;
vector<bool> m_vFound;
vector<string> m_vPlain;
vector<string> m_vBinary;
public:
void AddHash(string sHash); // lowercase, len % 2 == 0, MIN_HASH_LEN * 2 <= len <= MAX_HASH_LEN * 2
bool AnyhashLeft();
bool AnyHashLeftWithLen(int nLen);
void GetLeftHashWithLen(vector<string>& vHash, int nLen);
void SetPlain(string sHash, string sPlain, string sBinary);
bool GetPlain(string sHash, string& sPlain, string& sBinary);
int GetStatHashFound();
int GetStatHashTotal();
};
#endif