]> git.sesse.net Git - freerainbowtables/blob - Common/rt api/HashRoutine.h
681fa786c4a8a5e336f192ac999c99802eafae8e
[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 using namespace std;
13
14 typedef void (*HASHROUTINE)(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
15
16 class CHashRoutine  
17 {
18 public:
19         CHashRoutine();
20         virtual ~CHashRoutine();
21
22 private:
23         vector<string>          vHashRoutineName;
24         vector<HASHROUTINE>     vHashRoutine;
25         vector<int>                     vHashLen;
26         void AddHashRoutine(string sHashRoutineName, HASHROUTINE pHashRoutine, int nHashLen);
27
28 public:
29         string GetAllHashRoutineName();
30         void GetHashRoutine(string sHashRoutineName, HASHROUTINE& pHashRoutine, int& nHashLen);
31 };
32
33 #endif