forked from johguse/ERADICATE2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.hpp
More file actions
37 lines (31 loc) · 757 Bytes
/
types.hpp
File metadata and controls
37 lines (31 loc) · 757 Bytes
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
#ifndef HPP_TYPES
#define HPP_TYPES
/* The structs declared in this file should have size/alignment hints
* to ensure that their representation is identical to that in OpenCL.
*/
#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
enum class ModeFunction {
Benchmark, ZeroBytes, Matching, Leading, Range, Mirror, Doubles, LeadingRange, EdgeMirror,
};
typedef struct {
ModeFunction function;
cl_uchar data1[20];
cl_uchar data2[20];
} mode;
#pragma pack(push, 1)
typedef struct {
cl_uchar salt[32];
cl_uchar hash[20];
cl_uint found;
} result;
#pragma pack(pop)
typedef union {
cl_uchar b[200];
cl_ulong q[25];
cl_uint d[50];
} ethhash;
#endif /* HPP_TYPES */