Add prefixes to argon2 to avoid potential conflicts with other implementations.

This commit is contained in:
XMRig 2020-05-04 18:09:34 +07:00
parent b34e3e1a7b
commit 4326ba3c38
No known key found for this signature in database
GPG key ID: 446A53638BE94409
20 changed files with 134 additions and 207 deletions

View file

@ -323,7 +323,7 @@ int decode_string(argon2_context *ctx, const char *str, argon2_type type) {
ctx->flags = ARGON2_DEFAULT_FLAGS;
/* On return, must have valid context */
validation_result = validate_inputs(ctx);
validation_result = xmrig_ar2_validate_inputs(ctx);
if (validation_result != ARGON2_OK) {
return validation_result;
}
@ -371,7 +371,7 @@ int encode_string(char *dst, size_t dst_len, argon2_context *ctx,
} while ((void)0, 0)
const char* type_string = argon2_type2string(type, 0);
int validation_result = validate_inputs(ctx);
int validation_result = xmrig_ar2_validate_inputs(ctx);
if (!type_string) {
return ARGON2_ENCODING_FAIL;