mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 00:37:46 +00:00
Fixed invalid AstroBWT hashes after algo switching
This commit is contained in:
parent
d591832eea
commit
b7840d9ab6
1 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,7 @@ static void Salsa20_XORKeyStream(const void* key, void* output, size_t size)
|
|||
ECRYPT_keysetup(&ctx, static_cast<const uint8_t*>(key), 256, 64);
|
||||
ECRYPT_ivsetup(&ctx, iv);
|
||||
ECRYPT_keystream_bytes(&ctx, static_cast<uint8_t*>(output), size);
|
||||
memset(static_cast<uint8_t*>(output) - 16, 0, 16);
|
||||
memset(static_cast<uint8_t*>(output) + size, 0, 16);
|
||||
}
|
||||
#else
|
||||
|
@ -75,6 +76,7 @@ static void Salsa20_XORKeyStream(const void* key, void* output, size_t size)
|
|||
const uint64_t iv = 0;
|
||||
ZeroTier::Salsa20 s(key, &iv);
|
||||
s.XORKeyStream(output, size);
|
||||
memset(static_cast<uint8_t*>(output) - 16, 0, 16);
|
||||
memset(static_cast<uint8_t*>(output) + size, 0, 16);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue