mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
Rename fill_segment_* to argon2_fill_segment_*
This commit is contained in:
parent
9f14962388
commit
550622b04b
@ -45,7 +45,7 @@
|
||||
# define MAP_POPULATE 0
|
||||
#endif
|
||||
|
||||
static fill_segment_fn fill_segment = fill_segment_ref;
|
||||
static fill_segment_fn fill_segment = argon2_fill_segment_ref;
|
||||
|
||||
static void
|
||||
load_block(block *dst, const void *input)
|
||||
@ -525,24 +525,24 @@ argon2_pick_best_implementation(void)
|
||||
#if defined(HAVE_AVX512FINTRIN_H) && defined(HAVE_AVX2INTRIN_H) && \
|
||||
defined(HAVE_TMMINTRIN_H) && defined(HAVE_SMMINTRIN_H)
|
||||
if (sodium_runtime_has_avx512f()) {
|
||||
fill_segment = fill_segment_avx512f;
|
||||
fill_segment = argon2_fill_segment_avx512f;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_AVX2INTRIN_H) && defined(HAVE_TMMINTRIN_H) && \
|
||||
defined(HAVE_SMMINTRIN_H)
|
||||
if (sodium_runtime_has_avx2()) {
|
||||
fill_segment = fill_segment_avx2;
|
||||
fill_segment = argon2_fill_segment_avx2;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H)
|
||||
if (sodium_runtime_has_ssse3()) {
|
||||
fill_segment = fill_segment_ssse3;
|
||||
fill_segment = argon2_fill_segment_ssse3;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
fill_segment = fill_segment_ref;
|
||||
fill_segment = argon2_fill_segment_ref;
|
||||
|
||||
return 0;
|
||||
/* LCOV_EXCL_STOP */
|
||||
|
@ -260,14 +260,14 @@ void argon2_finalize(const argon2_context *context,
|
||||
typedef void (*fill_segment_fn)(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
int argon2_pick_best_implementation(void);
|
||||
void fill_segment_avx512f(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void fill_segment_avx2(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void fill_segment_ssse3(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void fill_segment_ref(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void argon2_fill_segment_avx512f(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void argon2_fill_segment_avx2(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void argon2_fill_segment_ssse3(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
void argon2_fill_segment_ref(const argon2_instance_t *instance,
|
||||
argon2_position_t position);
|
||||
|
||||
/*
|
||||
* Function that fills the entire memory t_cost times based on the first two
|
||||
|
@ -141,8 +141,8 @@ generate_addresses(const argon2_instance_t *instance,
|
||||
}
|
||||
|
||||
void
|
||||
fill_segment_avx2(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
argon2_fill_segment_avx2(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
|
@ -146,8 +146,8 @@ generate_addresses(const argon2_instance_t *instance,
|
||||
}
|
||||
|
||||
void
|
||||
fill_segment_avx512f(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
argon2_fill_segment_avx512f(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
|
@ -141,7 +141,8 @@ generate_addresses(const argon2_instance_t *instance,
|
||||
}
|
||||
|
||||
void
|
||||
fill_segment_ref(const argon2_instance_t *instance, argon2_position_t position)
|
||||
argon2_fill_segment_ref(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
/* Pseudo-random values that determine the reference block position */
|
||||
|
@ -140,8 +140,8 @@ generate_addresses(const argon2_instance_t *instance,
|
||||
}
|
||||
|
||||
void
|
||||
fill_segment_ssse3(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
argon2_fill_segment_ssse3(const argon2_instance_t *instance,
|
||||
argon2_position_t position)
|
||||
{
|
||||
block *ref_block = NULL, *curr_block = NULL;
|
||||
uint64_t pseudo_rand, ref_index, ref_lane;
|
||||
|
Loading…
Reference in New Issue
Block a user