initstate -> initial_state

This commit is contained in:
Frank Denis 2017-02-26 00:11:58 +01:00
parent d860121ebc
commit 881f8ab599
2 changed files with 4 additions and 4 deletions

View File

@ -194,13 +194,13 @@ SHA256_Pad(crypto_hash_sha256_state *state)
int int
crypto_hash_sha256_init(crypto_hash_sha256_state *state) crypto_hash_sha256_init(crypto_hash_sha256_state *state)
{ {
static const uint32_t sha256_initstate[8] = { static const uint32_t sha256_initial_state[8] = {
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
}; };
state->count = (uint64_t) 0U; state->count = (uint64_t) 0U;
memcpy(state->state, sha256_initstate, sizeof sha256_initstate); memcpy(state->state, sha256_initial_state, sizeof sha256_initial_state);
return 0; return 0;
} }

View File

@ -214,7 +214,7 @@ SHA512_Pad(crypto_hash_sha512_state *state)
int int
crypto_hash_sha512_init(crypto_hash_sha512_state *state) crypto_hash_sha512_init(crypto_hash_sha512_state *state)
{ {
static const uint64_t sha512_initstate[8] = { static const uint64_t sha512_initial_state[8] = {
0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL,
0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL,
0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL,
@ -222,7 +222,7 @@ crypto_hash_sha512_init(crypto_hash_sha512_state *state)
}; };
state->count[0] = state->count[1] = (uint64_t) 0U; state->count[0] = state->count[1] = (uint64_t) 0U;
memcpy(state->state, sha512_initstate, sizeof sha512_initstate); memcpy(state->state, sha512_initial_state, sizeof sha512_initial_state);
return 0; return 0;
} }