forked from mhssamadani/Autolykos2_AMD_Miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpuAutolykos.h
executable file
·70 lines (59 loc) · 1.3 KB
/
cpuAutolykos.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include "definitions.h"
#include "easylogging++.h"
#include <curl/curl.h>
#include <inttypes.h>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <atomic>
#include <chrono>
#include <mutex>
#include <thread>
#include <vector>
#include <random>
#include "cryptography.h"
#include "conversion.h"
#include "definitions.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/pem.h>
#include <openssl/evp.h>
#include <openssl/sha.h>
#include <openssl/hmac.h>
#include <openssl/opensslv.h>
#include <random>
class AutolykosAlg
{
public:
unsigned long long CONST_MESS[CONST_MES_SIZE_8 / 8];
AutolykosAlg();
~AutolykosAlg();
int m_iAlgVer;
void Blake2b256(const char * in, const int len, uint8_t * output, char * outstr);
void GenIdex(const char * in, const int len, uint32_t* index, uint64_t N_LEN);
void hashFn(const char * in, const int len, uint8_t * output);
bool RunAlg(
uint8_t *B_mes,
uint8_t *nonce,
uint8_t *bPool,
uint8_t *height,
uint64_t N_LEN
);
private:
char *m_str = NULL;
char *bound_str = NULL;
uint8_t *m_n;
uint8_t *p_w_m_n;
uint8_t *Hinput;
char *n_str;
char *h_str;
};