Rename the remaining unprefixed functions
argon2_fill_first_blocks() can be static
This commit is contained in:
parent
557c7eafab
commit
a4c41e5c8f
@ -223,7 +223,7 @@ argon2_finalize(const argon2_context *context, argon2_instance_t *instance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fill_memory_blocks(argon2_instance_t *instance, uint32_t pass)
|
argon2_fill_memory_blocks(argon2_instance_t *instance, uint32_t pass)
|
||||||
{
|
{
|
||||||
argon2_position_t position;
|
argon2_position_t position;
|
||||||
uint32_t l;
|
uint32_t l;
|
||||||
@ -369,8 +369,8 @@ argon2_validate_inputs(const argon2_context *context)
|
|||||||
return ARGON2_OK;
|
return ARGON2_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance)
|
argon2_fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance)
|
||||||
{
|
{
|
||||||
uint32_t l;
|
uint32_t l;
|
||||||
/* Make the first and second block in each lane as G(H0||i||0) or
|
/* Make the first and second block in each lane as G(H0||i||0) or
|
||||||
@ -511,7 +511,7 @@ argon2_initialize(argon2_instance_t *instance, argon2_context *context)
|
|||||||
|
|
||||||
/* 3. Creating first blocks, we always have at least two blocks in a slice
|
/* 3. Creating first blocks, we always have at least two blocks in a slice
|
||||||
*/
|
*/
|
||||||
fill_first_blocks(blockhash, instance);
|
argon2_fill_first_blocks(blockhash, instance);
|
||||||
/* Clearing the hash */
|
/* Clearing the hash */
|
||||||
sodium_memzero(blockhash, ARGON2_PREHASH_SEED_LENGTH);
|
sodium_memzero(blockhash, ARGON2_PREHASH_SEED_LENGTH);
|
||||||
|
|
||||||
|
@ -216,14 +216,6 @@ static uint32_t index_alpha(const argon2_instance_t *instance,
|
|||||||
*/
|
*/
|
||||||
int argon2_validate_inputs(const argon2_context *context);
|
int argon2_validate_inputs(const argon2_context *context);
|
||||||
|
|
||||||
/*
|
|
||||||
* Function creates first 2 blocks per lane
|
|
||||||
* @param instance Pointer to the current instance
|
|
||||||
* @param blockhash Pointer to the pre-hashing digest
|
|
||||||
* @pre blockhash must point to @a PREHASH_SEED_LENGTH allocated values
|
|
||||||
*/
|
|
||||||
void fill_first_blocks(uint8_t *blockhash, const argon2_instance_t *instance);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function allocates memory, hashes the inputs with Blake, and creates first
|
* Function allocates memory, hashes the inputs with Blake, and creates first
|
||||||
* two blocks. Returns the pointer to the main memory with 2 blocks per lane
|
* two blocks. Returns the pointer to the main memory with 2 blocks per lane
|
||||||
@ -275,6 +267,6 @@ void argon2_fill_segment_ref(const argon2_instance_t *instance,
|
|||||||
* @param instance Pointer to the current instance
|
* @param instance Pointer to the current instance
|
||||||
* @return Zero if successful, -1 if memory failed to allocate
|
* @return Zero if successful, -1 if memory failed to allocate
|
||||||
*/
|
*/
|
||||||
void fill_memory_blocks(argon2_instance_t *instance, uint32_t pass);
|
void argon2_fill_memory_blocks(argon2_instance_t *instance, uint32_t pass);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -73,7 +73,7 @@ argon2_ctx(argon2_context *context, argon2_type type)
|
|||||||
|
|
||||||
/* 4. Filling memory */
|
/* 4. Filling memory */
|
||||||
for (pass = 0; pass < instance.passes; pass++) {
|
for (pass = 0; pass < instance.passes; pass++) {
|
||||||
fill_memory_blocks(&instance, pass);
|
argon2_fill_memory_blocks(&instance, pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 5. Finalization */
|
/* 5. Finalization */
|
||||||
|
Loading…
Reference in New Issue
Block a user