Add compilation-time poly1305 structure size checks
This commit is contained in:
parent
7561a25d5a
commit
8bced53601
@ -64,6 +64,10 @@ static int
|
||||
crypto_onetimeauth_poly1305_donna_init(crypto_onetimeauth_poly1305_state *state,
|
||||
const unsigned char *key)
|
||||
{
|
||||
(void) sizeof(int[sizeof (crypto_onetimeauth_poly1305_state) >=
|
||||
sizeof (poly1305_context) ? 1 : -1]);
|
||||
(void) sizeof(int[sizeof (poly1305_context) >=
|
||||
sizeof (poly1305_state_internal_t) ? 1 : -1]);
|
||||
poly1305_init((poly1305_context *) state, key);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user