summaryrefslogtreecommitdiff
path: root/libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c')
-rw-r--r--libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c b/libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c
index a9a2b4872d..6221f285be 100644
--- a/libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c
+++ b/libs/libsodium/src/crypto_pwhash/argon2/argon2-encoding.c
@@ -83,7 +83,7 @@ decode_decimal(const char *str, unsigned long *v)
* output length must be in the allowed ranges defined in argon2.h.
*
* The ctx struct must contain buffers large enough to hold the salt and pwd
- * when it is fed into decode_string.
+ * when it is fed into argon2_decode_string.
*/
/*
@@ -91,7 +91,7 @@ decode_decimal(const char *str, unsigned long *v)
* Returned value is ARGON2_OK on success.
*/
int
-decode_string(argon2_context *ctx, const char *str, argon2_type type)
+argon2_decode_string(argon2_context *ctx, const char *str, argon2_type type)
{
/* Prefix checking */
#define CC(prefix) \
@@ -193,7 +193,7 @@ decode_string(argon2_context *ctx, const char *str, argon2_type type)
BIN(ctx->salt, maxsaltlen, ctx->saltlen);
CC("$");
BIN(ctx->out, maxoutlen, ctx->outlen);
- validation_result = validate_inputs(ctx);
+ validation_result = argon2_validate_inputs(ctx);
if (validation_result != ARGON2_OK) {
return validation_result;
}
@@ -238,7 +238,8 @@ u32_to_string(char *str, uint32_t x)
* On success, ARGON2_OK is returned.
*/
int
-encode_string(char *dst, size_t dst_len, argon2_context *ctx, argon2_type type)
+argon2_encode_string(char *dst, size_t dst_len, argon2_context *ctx,
+ argon2_type type)
{
#define SS(str) \
do { \
@@ -280,7 +281,7 @@ encode_string(char *dst, size_t dst_len, argon2_context *ctx, argon2_type type)
default:
return ARGON2_ENCODING_FAIL;
}
- validation_result = validate_inputs(ctx);
+ validation_result = argon2_validate_inputs(ctx);
if (validation_result != ARGON2_OK) {
return validation_result;
}