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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user