From 31a153c9370a76e5163805700eafd042faf06319 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 23 Jan 2016 22:52:11 +0100 Subject: [PATCH] argon2_core() -> argon2_ctx() --- src/libsodium/crypto_pwhash/argon2/argon2-core.h | 2 +- src/libsodium/crypto_pwhash/argon2/argon2.c | 8 ++++---- src/libsodium/crypto_pwhash/argon2/argon2.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsodium/crypto_pwhash/argon2/argon2-core.h b/src/libsodium/crypto_pwhash/argon2/argon2-core.h index fc14e353..733e532e 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2-core.h +++ b/src/libsodium/crypto_pwhash/argon2/argon2-core.h @@ -19,7 +19,7 @@ /*************************Argon2 internal * constants**************************************************/ -enum argon2_core_constants { +enum argon2_ctx_constants { /* Version of the algorithm */ ARGON2_VERSION_NUMBER = 0x10, diff --git a/src/libsodium/crypto_pwhash/argon2/argon2.c b/src/libsodium/crypto_pwhash/argon2/argon2.c index ea7fed9e..2ff4923e 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2.c @@ -24,7 +24,7 @@ #include "argon2-encoding.h" #include "argon2-core.h" -int argon2_core(argon2_context *context, argon2_type type) { +int argon2_ctx(argon2_context *context, argon2_type type) { /* 1. Validate all inputs */ int result = validate_inputs(context); uint32_t memory_blocks, segment_length; @@ -124,7 +124,7 @@ int argon2_hash(const uint32_t t_cost, const uint32_t m_cost, context.threads = parallelism; context.flags = ARGON2_DEFAULT_FLAGS; - result = argon2_core(&context, type); + result = argon2_ctx(&context, type); if (result != ARGON2_OK) { sodium_memzero(out, hashlen); @@ -235,7 +235,7 @@ int argon2i_verify(const char *encoded, const void *pwd, const size_t pwdlen) { } int argon2i(argon2_context *context) { - return argon2_core(context, Argon2_i); + return argon2_ctx(context, Argon2_i); } int verify_i(argon2_context *context, const char *hash) { @@ -244,7 +244,7 @@ int verify_i(argon2_context *context, const char *hash) { return ARGON2_OUT_PTR_MISMATCH; } - result = argon2_core(context, Argon2_i); + result = argon2_ctx(context, Argon2_i); if (ARGON2_OK != result) { return result; diff --git a/src/libsodium/crypto_pwhash/argon2/argon2.h b/src/libsodium/crypto_pwhash/argon2/argon2.h index c5ef76a5..095a9b7c 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2.h +++ b/src/libsodium/crypto_pwhash/argon2/argon2.h @@ -189,7 +189,7 @@ typedef enum Argon2_type { Argon2_i = 1 } argon2_type; * @param context Pointer to the Argon2 internal structure * @return Error code if smth is wrong, ARGON2_OK otherwise */ -int argon2_core(argon2_context *context, argon2_type type); +int argon2_ctx(argon2_context *context, argon2_type type); /** * Hashes a password with Argon2i, producing an encoded hash