diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-10 18:04:14 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-10 18:04:14 +0100 |
commit | 45da9c9f296215a4d9ff77db0e6d48bda105ddee (patch) | |
tree | cdf816d309a228d7f3f47370b9f6776b514816d1 /src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c | |
parent | 519972c9c18a103a7689844150c75e939c642115 (diff) | |
download | fastd-45da9c9f296215a4d9ff77db0e6d48bda105ddee.tar fastd-45da9c9f296215a4d9ff77db0e6d48bda105ddee.zip |
Remove aligned data_t type again
Diffstat (limited to 'src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c')
-rw-r--r-- | src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c b/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c index 5e0c7b2..cb01e0f 100644 --- a/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c +++ b/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c @@ -34,7 +34,7 @@ struct fastd_method_session_state { fastd_method_common_t common; - data_t key[crypto_secretbox_xsalsa20poly1305_KEYBYTES]; + uint8_t key[crypto_secretbox_xsalsa20poly1305_KEYBYTES] __attribute__((aligned(8))); }; @@ -121,7 +121,7 @@ static bool method_encrypt(fastd_context_t *ctx, fastd_peer_t *peer UNUSED, fast *out = fastd_buffer_alloc(ctx, in.len, 0, 0); - data_t nonce[crypto_secretbox_xsalsa20poly1305_NONCEBYTES] = {}; + uint8_t nonce[crypto_secretbox_xsalsa20poly1305_NONCEBYTES] __attribute__((aligned(8))) = {}; memcpy_nonce(nonce, session->common.send_nonce); crypto_secretbox_xsalsa20poly1305(out->data, in.data, in.len, nonce, session->key); @@ -151,7 +151,7 @@ static bool method_decrypt(fastd_context_t *ctx, fastd_peer_t *peer, fastd_metho if (flags) return false; - data_t nonce[crypto_secretbox_xsalsa20poly1305_NONCEBYTES] = {}; + uint8_t nonce[crypto_secretbox_xsalsa20poly1305_NONCEBYTES] __attribute__((aligned(8))) = {}; memcpy_nonce(nonce, in_nonce); fastd_buffer_pull_head_zero(ctx, &in, crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES); |