Small cleanups.

This commit is contained in:
XMRig 2020-05-03 13:38:34 +07:00
parent a0eb766238
commit c18478a6b4
No known key found for this signature in database
GPG key ID: 446A53638BE94409
2 changed files with 7 additions and 4 deletions

View file

@ -87,7 +87,7 @@ static FORCE_INLINE void blake2b_init0(blake2b_state *S) {
memcpy(S->h, blake2b_IV, sizeof(S->h));
}
int blake2b_init_param(blake2b_state *S, const blake2b_param *P) {
int rx_blake2b_init_param(blake2b_state *S, const blake2b_param *P) {
const unsigned char *p = (const unsigned char *)P;
unsigned int i;
@ -130,7 +130,7 @@ int rx_blake2b_init(blake2b_state *S, size_t outlen) {
memset(P.salt, 0, sizeof(P.salt));
memset(P.personal, 0, sizeof(P.personal));
return blake2b_init_param(S, &P);
return rx_blake2b_init_param(S, &P);
}
int rx_blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t keylen) {
@ -163,7 +163,7 @@ int rx_blake2b_init_key(blake2b_state *S, size_t outlen, const void *key, size_t
memset(P.salt, 0, sizeof(P.salt));
memset(P.personal, 0, sizeof(P.personal));
if (blake2b_init_param(S, &P) < 0) {
if (rx_blake2b_init_param(S, &P) < 0) {
blake2b_invalidate_state(S);
return -1;
}

View file

@ -36,7 +36,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "crypto/randomx/program.hpp"
#include "crypto/randomx/reciprocal.h"
#include "crypto/randomx/virtual_memory.hpp"
#include "crypto/rx/Rx.h"
#ifdef XMRIG_FIX_RYZEN
# include "crypto/rx/Rx.h"
#endif
#ifdef _MSC_VER
# include <intrin.h>