mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 04:25:10 -07:00
poly1305_state_internal_t alignment is fine; add intermediary void * cast.
This commit is contained in:
parent
c914f6a1af
commit
ffdbac52ce
@ -10,7 +10,7 @@
|
||||
static void
|
||||
poly1305_update(poly1305_context *ctx, const unsigned char *m,
|
||||
unsigned long long bytes) {
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)(void *)ctx;
|
||||
unsigned long long i;
|
||||
|
||||
/* handle leftover */
|
||||
|
@ -45,7 +45,7 @@ U32TO8(unsigned char *p, unsigned long v) {
|
||||
|
||||
static void
|
||||
poly1305_init(poly1305_context *ctx, const unsigned char key[32]) {
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)(void *)ctx;
|
||||
|
||||
/* r &= 0xffffffc0ffffffc0ffffffc0fffffff */
|
||||
st->r[0] = (U8TO32(&key[ 0]) ) & 0x3ffffff;
|
||||
@ -134,7 +134,7 @@ poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m, unsigned
|
||||
|
||||
static POLY1305_NOINLINE void
|
||||
poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) {
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)(void *)ctx;
|
||||
unsigned long h0,h1,h2,h3,h4,c;
|
||||
unsigned long g0,g1,g2,g3,g4;
|
||||
unsigned long long f;
|
||||
|
@ -59,7 +59,7 @@ U64TO8(unsigned char *p, unsigned long long v) {
|
||||
|
||||
static void
|
||||
poly1305_init(poly1305_context *ctx, const unsigned char key[32]) {
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)(void *)ctx;
|
||||
unsigned long long t0,t1;
|
||||
|
||||
/* r &= 0xffffffc0ffffffc0ffffffc0fffffff */
|
||||
@ -138,7 +138,7 @@ poly1305_blocks(poly1305_state_internal_t *st, const unsigned char *m, unsigned
|
||||
|
||||
static POLY1305_NOINLINE void
|
||||
poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) {
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
|
||||
poly1305_state_internal_t *st = (poly1305_state_internal_t *)(void *)ctx;
|
||||
unsigned long long h0,h1,h2,c;
|
||||
unsigned long long g0,g1,g2;
|
||||
unsigned long long t0,t1;
|
||||
|
Loading…
Reference in New Issue
Block a user