hardcoded size -> sizeof

This commit is contained in:
Frank Denis 2014-04-14 21:37:42 -07:00
parent 434966c23d
commit 9f5a7ce70a
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state,
}
crypto_hash_sha256_update(&state->octx, pad, 64);
sodium_memzero((void *) khash, 32);
sodium_memzero((void *) khash, sizeof khash);
return 0;
}
@ -91,7 +91,7 @@ crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state,
crypto_hash_sha256_update(&state->octx, ihash, 32);
crypto_hash_sha256_final(&state->octx, out);
sodium_memzero((void *) ihash, 32);
sodium_memzero((void *) ihash, sizeof ihash);
return 0;
}

View File

@ -66,7 +66,7 @@ crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state,
}
crypto_hash_sha512_update(&state->octx, pad, 128);
sodium_memzero((void *) khash, 64);
sodium_memzero((void *) khash, sizeof khash);
return 0;
}
@ -91,7 +91,7 @@ crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *state,
crypto_hash_sha512_update(&state->octx, ihash, 64);
crypto_hash_sha512_final(&state->octx, out);
sodium_memzero((void *) ihash, 64);
sodium_memzero((void *) ihash, sizeof ihash);
return 0;
}