mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 12:36:01 -07:00
Merge branch 'master' of github.com:jedisct1/libsodium
* 'master' of github.com:jedisct1/libsodium: Use unsigned types for sizes in tests. Having dead code in the tree is sad, but keeps the diff with the reference implementation to a minimum. THANKS += @jshahbazi for the Fortran bindings
This commit is contained in:
commit
70c731c95f
1
THANKS
1
THANKS
@ -1,6 +1,7 @@
|
||||
@alethia7
|
||||
@dnaq
|
||||
@joshjdevl
|
||||
@jshahbazi
|
||||
@neheb
|
||||
Amit Murthy (@amitmurthy)
|
||||
Bruno Oliveira (@abstractj)
|
||||
|
@ -48,13 +48,13 @@ static inline int blake2b_set_lastnode( blake2b_state *S )
|
||||
S->f[1] = ~0ULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline int blake2b_clear_lastnode( blake2b_state *S )
|
||||
{
|
||||
S->f[1] = 0ULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Some helper functions, not necessarily useful */
|
||||
static inline int blake2b_set_lastblock( blake2b_state *S )
|
||||
{
|
||||
@ -63,7 +63,7 @@ static inline int blake2b_set_lastblock( blake2b_state *S )
|
||||
S->f[0] = ~0ULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline int blake2b_clear_lastblock( blake2b_state *S )
|
||||
{
|
||||
if( S->last_node ) blake2b_clear_lastnode( S );
|
||||
@ -71,7 +71,7 @@ static inline int blake2b_clear_lastblock( blake2b_state *S )
|
||||
S->f[0] = 0ULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
static inline int blake2b_increment_counter( blake2b_state *S, const uint64_t inc )
|
||||
{
|
||||
S->t[0] += inc;
|
||||
@ -82,6 +82,7 @@ static inline int blake2b_increment_counter( blake2b_state *S, const uint64_t in
|
||||
|
||||
|
||||
// Parameter-related functions
|
||||
#if 0
|
||||
static inline int blake2b_param_set_digest_length( blake2b_param *P, const uint8_t digest_length )
|
||||
{
|
||||
P->digest_length = digest_length;
|
||||
@ -123,7 +124,7 @@ static inline int blake2b_param_set_inner_length( blake2b_param *P, const uint8_
|
||||
P->inner_length = inner_length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
static inline int blake2b_param_set_salt( blake2b_param *P, const uint8_t salt[BLAKE2B_SALTBYTES] )
|
||||
{
|
||||
memcpy( P->salt, salt, BLAKE2B_SALTBYTES );
|
||||
|
@ -44,13 +44,13 @@ static inline int blake2s_set_lastnode( blake2s_state *S )
|
||||
S->f[1] = ~0U;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline int blake2s_clear_lastnode( blake2s_state *S )
|
||||
{
|
||||
S->f[1] = 0U;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Some helper functions, not necessarily useful */
|
||||
static inline int blake2s_set_lastblock( blake2s_state *S )
|
||||
{
|
||||
@ -59,7 +59,7 @@ static inline int blake2s_set_lastblock( blake2s_state *S )
|
||||
S->f[0] = ~0U;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline int blake2s_clear_lastblock( blake2s_state *S )
|
||||
{
|
||||
if( S->last_node ) blake2s_clear_lastnode( S );
|
||||
@ -67,7 +67,7 @@ static inline int blake2s_clear_lastblock( blake2s_state *S )
|
||||
S->f[0] = 0U;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
static inline int blake2s_increment_counter( blake2s_state *S, const uint32_t inc )
|
||||
{
|
||||
S->t[0] += inc;
|
||||
@ -76,6 +76,7 @@ static inline int blake2s_increment_counter( blake2s_state *S, const uint32_t in
|
||||
}
|
||||
|
||||
// Parameter-related functions
|
||||
#if 0
|
||||
static inline int blake2s_param_set_digest_length( blake2s_param *P, const uint8_t digest_length )
|
||||
{
|
||||
P->digest_length = digest_length;
|
||||
@ -117,7 +118,7 @@ static inline int blake2s_param_set_inner_length( blake2s_param *P, const uint8_
|
||||
P->inner_length = inner_length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
static inline int blake2s_param_set_salt( blake2s_param *P, const uint8_t salt[BLAKE2S_SALTBYTES] )
|
||||
{
|
||||
memcpy( P->salt, salt, BLAKE2S_SALTBYTES );
|
||||
|
@ -47,7 +47,7 @@ unsigned char c[147 + crypto_box_MACBYTES];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
crypto_box_easy(c, m, 131, nonce, bobpk, alicesk);
|
||||
for (i = 0; i < 131 + crypto_box_MACBYTES; ++i) {
|
||||
|
@ -41,7 +41,7 @@ unsigned char mac[crypto_secretbox_MACBYTES];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
crypto_secretbox_easy(c, m, 131, nonce, firstkey);
|
||||
for (i = 0;i < 131 + crypto_secretbox_MACBYTES; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user