mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 17:57:21 +09:00
Directly use the internal state type when possible
This commit is contained in:
@@ -55,11 +55,11 @@ crypto_onetimeauth_poly1305_donna(unsigned char *out, const unsigned char *m,
|
||||
unsigned long long inlen,
|
||||
const unsigned char *key)
|
||||
{
|
||||
CRYPTO_ALIGN(64) crypto_onetimeauth_poly1305_state state;
|
||||
CRYPTO_ALIGN(64) poly1305_state_internal_t state;
|
||||
|
||||
poly1305_init((poly1305_state_internal_t *)(void *) &state, key);
|
||||
poly1305_update((poly1305_state_internal_t *)(void *) &state, m, inlen);
|
||||
poly1305_finish((poly1305_state_internal_t *)(void *) &state, out);
|
||||
poly1305_init(&state, key);
|
||||
poly1305_update(&state, m, inlen);
|
||||
poly1305_finish(&state, out);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user