1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 00:15:04 -05:00

Move keccak to common code.

This commit is contained in:
XMRig
2018-04-20 14:45:51 +07:00
parent 2d22f2aeff
commit 98e7308597
7 changed files with 105 additions and 68 deletions

View File

@@ -35,6 +35,7 @@
#include "api/ApiRouter.h"
#include "common/api/HttpReply.h"
#include "common/api/HttpRequest.h"
#include "common/crypto/keccak.h"
#include "common/Platform.h"
#include "core/Config.h"
#include "core/Controller.h"
@@ -50,12 +51,6 @@
#include "workers/Workers.h"
extern "C"
{
#include "crypto/c_keccak.h"
}
static inline double normalize(double d)
{
if (!isnormal(d)) {
@@ -171,7 +166,7 @@ void ApiRouter::genId()
memcpy(input, interfaces[i].phys_addr, addrSize);
memcpy(input + addrSize, APP_KIND, strlen(APP_KIND));
keccak(input, static_cast<int>(inSize), hash, sizeof(hash));
xmrig::keccak(input, inSize, hash);
Job::toHex(hash, 8, m_id);
delete [] input;