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

@ -22,6 +22,7 @@
*/
#include "common/crypto/keccak.h"
#include "common/net/Client.h"
#include "common/net/strategies/FailoverStrategy.h"
#include "common/Platform.h"
@ -31,12 +32,6 @@
#include "net/strategies/DonateStrategy.h"
extern "C"
{
#include "crypto/c_keccak.h"
}
const static char *kDonatePool1 = "miner.fee.xmrig.com";
const static char *kDonatePool2 = "emergency.fee.xmrig.com";
@ -56,7 +51,7 @@ DonateStrategy::DonateStrategy(int level, const char *user, int algo, IStrategyL
uint8_t hash[200];
char userId[65] = { 0 };
keccak(reinterpret_cast<const uint8_t *>(user), static_cast<int>(strlen(user)), hash, sizeof(hash));
xmrig::keccak(reinterpret_cast<const uint8_t *>(user), strlen(user), hash);
Job::toHex(hash, 32, userId);
if (algo == xmrig::CRYPTONIGHT) {