-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathChainWalkSet.h
47 lines (38 loc) · 1.16 KB
/
ChainWalkSet.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
38
39
40
41
42
43
44
45
46
47
/*
RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
Copyright (C) Zhu Shuanglei <[email protected]>
*/
#ifndef _CHAINWALKSET_H
#define _CHAINWALKSET_H
#include "Public.h"
struct ChainWalk
{
unsigned char Hash[MAX_HASH_LEN];
//int nHashLen; // Implied
uint64* pIndexE; // mapStartPosIndexE, Len = nRainbowChainLen - 1
};
class CChainWalkSet
{
public:
CChainWalkSet();
virtual ~CChainWalkSet();
private:
string m_sHashRoutineName; // Discard all if not match
string m_sPlainCharsetName; // Discard all if not match
int m_nPlainLenMin; // Discard all if not match
int m_nPlainLenMax; // Discard all if not match
int m_nRainbowTableIndex; // Discard all if not match
int m_nRainbowChainLen; // Discard all if not match
list<ChainWalk> m_lChainWalk;
private:
void DiscardAll();
public:
uint64* RequestWalk(unsigned char* pHash, int nHashLen,
string sHashRoutineName,
string sPlainCharsetName, int nPlainLenMin, int nPlainLenMax,
int nRainbowTableIndex,
int nRainbowChainLen,
bool& fNewlyGenerated);
void DiscardWalk(uint64* pIndexE);
};
#endif