mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Remove unused blake2b code
This commit is contained in:
@@ -41,13 +41,6 @@ blake2b_set_lastnode(blake2b_state *S)
|
||||
return 0;
|
||||
}
|
||||
/* LCOV_EXCL_STOP */
|
||||
#if 0
|
||||
static inline int blake2b_clear_lastnode( blake2b_state *S )
|
||||
{
|
||||
S->f[1] = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
blake2b_is_lastblock(const blake2b_state *S)
|
||||
@@ -64,15 +57,7 @@ blake2b_set_lastblock(blake2b_state *S)
|
||||
S->f[0] = -1;
|
||||
return 0;
|
||||
}
|
||||
#if 0
|
||||
static inline int blake2b_clear_lastblock( blake2b_state *S )
|
||||
{
|
||||
if( S->last_node ) blake2b_clear_lastnode( S );
|
||||
|
||||
S->f[0] = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
static inline int
|
||||
blake2b_increment_counter(blake2b_state *S, const uint64_t inc)
|
||||
{
|
||||
@@ -89,51 +74,6 @@ blake2b_increment_counter(blake2b_state *S, const uint64_t inc)
|
||||
}
|
||||
|
||||
/* Parameter-related functions */
|
||||
#if 0
|
||||
/* Redundant: digest length is directly set in blake2b_init(), blake2b_init_salt_personal(),
|
||||
* blake2b_init_key() and blake2b_init_key_salt_personal() */
|
||||
static inline int blake2b_param_set_digest_length( blake2b_param *P, const uint8_t digest_length )
|
||||
{
|
||||
P->digest_length = digest_length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blake2b_param_set_fanout( blake2b_param *P, const uint8_t fanout )
|
||||
{
|
||||
P->fanout = fanout;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blake2b_param_set_max_depth( blake2b_param *P, const uint8_t depth )
|
||||
{
|
||||
P->depth = depth;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blake2b_param_set_leaf_length( blake2b_param *P, const uint32_t leaf_length )
|
||||
{
|
||||
STORE32_LE( P->leaf_length, leaf_length );
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blake2b_param_set_node_offset( blake2b_param *P, const uint64_t node_offset )
|
||||
{
|
||||
STORE64_LE( P->node_offset, node_offset );
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blake2b_param_set_node_depth( blake2b_param *P, const uint8_t node_depth )
|
||||
{
|
||||
P->node_depth = node_depth;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int blake2b_param_set_inner_length( blake2b_param *P, const uint8_t inner_length )
|
||||
{
|
||||
P->inner_length = inner_length;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
static inline int
|
||||
blake2b_param_set_salt(blake2b_param *P, const uint8_t salt[BLAKE2B_SALTBYTES])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user