]> git.sesse.net Git - freerainbowtables/blob - Common/rt api/HashRoutine.h
64-bit fixes for distrrtgen
[freerainbowtables] / Common / rt api / HashRoutine.h
1 /*
2    RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
3
4    Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
5 */
6
7 #ifndef _HASHROUTINE_H
8 #define _HASHROUTINE_H
9
10 #include <string>
11 #include <vector>
12
13 #include "global.h"
14
15 using namespace std;
16
17 typedef void (*HASHROUTINE)(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
18
19 class CHashRoutine  
20 {
21 public:
22         CHashRoutine();
23         virtual ~CHashRoutine();
24
25 private:
26         vector<string>          vHashRoutineName;
27         vector<HASHROUTINE>     vHashRoutine;
28         vector<int>                     vHashLen;
29         void AddHashRoutine(string sHashRoutineName, HASHROUTINE pHashRoutine, int nHashLen);
30
31 public:
32         string GetAllHashRoutineName();
33         void GetHashRoutine(string sHashRoutineName, HASHROUTINE& pHashRoutine, int& nHashLen);
34 };
35
36 #endif