forked from johguse/profanity
-
Notifications
You must be signed in to change notification settings - Fork 101
/
Mode.hpp
51 lines (40 loc) · 951 Bytes
/
Mode.hpp
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
48
49
50
51
#ifndef HPP_MODE
#define HPP_MODE
#include <string>
#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
enum HashTarget {
ADDRESS,
CONTRACT,
HASH_TARGET_COUNT
};
class Mode {
private:
Mode();
public:
static Mode matching(const std::string strHex);
static Mode range(const cl_uchar min, const cl_uchar max);
static Mode leading(const char charLeading);
static Mode leadingRange(const cl_uchar min, const cl_uchar max);
static Mode mirror();
static Mode benchmark();
static Mode zeros();
static Mode zeroBytes();
static Mode letters();
static Mode numbers();
static Mode doubles();
std::string name;
std::string kernel;
HashTarget target;
// kernel transform fn name
std::string transformKernel() const;
// Address, Contract, ...
std::string transformName() const;
cl_uchar data1[20];
cl_uchar data2[20];
cl_uchar score;
};
#endif /* HPP_MODE */