Added generic Argon2 implementation (conflicts with RandomX).

This commit is contained in:
XMRig 2019-08-16 00:31:29 +07:00
parent df58821655
commit 0c25424a3e
53 changed files with 5140 additions and 126 deletions

View file

@ -166,7 +166,7 @@ namespace xmrig {
template<>
xmrig::IWorker *xmrig::Workers<CpuLaunchData>::create(Thread<CpuLaunchData> *handle)
{
const int intensity = handle->config().intensity;
const uint32_t intensity = static_cast<uint32_t>(handle->config().intensity);
# if defined(XMRIG_ALGO_RANDOMX) || defined(XMRIG_ALGO_CN_GPU)
if (intensity > handle->config().algorithm.maxIntensity()) {

View file

@ -156,6 +156,13 @@ bool xmrig::CpuWorker<N>::selfTest()
}
# endif
# ifdef XMRIG_ALGO_ARGON2
if (m_algorithm.family() == Algorithm::ARGON2) {
return verify(Algorithm::AR2_CHUKWA, argon2_chukwa_test_out) &&
verify(Algorithm::AR2_WRKZ, argon2_wrkz_test_out);
}
# endif
return false;
}