aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcryptobox
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-08 22:27:04 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-08 22:27:04 +0000
commit544fea1f9f6e29eda29a616bbafd47b908ad7b6f (patch)
tree7d1059216e3692b0cb3480508c8eab823dd928d8 /src/libcryptobox
parent7f1ad00467415ca80d22e9865dab0792a9ee27fa (diff)
downloadrspamd-544fea1f9f6e29eda29a616bbafd47b908ad7b6f.tar.gz
rspamd-544fea1f9f6e29eda29a616bbafd47b908ad7b6f.zip
Unify align macro.
Diffstat (limited to 'src/libcryptobox')
-rw-r--r--src/libcryptobox/cryptobox.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcryptobox/cryptobox.c b/src/libcryptobox/cryptobox.c
index da43a137c..ecc3b5cfc 100644
--- a/src/libcryptobox/cryptobox.c
+++ b/src/libcryptobox/cryptobox.c
@@ -141,8 +141,8 @@ void rspamd_cryptobox_encrypt_nm_inplace (guchar *data, gsize len,
const rspamd_nm_t nm, rspamd_sig_t sig)
{
poly1305_state mac_ctx;
- guchar subkey[CHACHA_BLOCKBYTES];
- chacha_state s;
+ ALIGN(64) guchar subkey[CHACHA_BLOCKBYTES];
+ ALIGN(64) chacha_state s;
gsize r;
xchacha_init (&s, (const chacha_key *)nm, (const chacha_iv24 *)nonce, 20);
@@ -164,10 +164,10 @@ gboolean
rspamd_cryptobox_decrypt_nm_inplace (guchar *data, gsize len,
const rspamd_nonce_t nonce, const rspamd_nm_t nm, const rspamd_sig_t sig)
{
- poly1305_state mac_ctx;
- guchar subkey[CHACHA_BLOCKBYTES];
+ ALIGN(64) poly1305_state mac_ctx;
+ ALIGN(64) guchar subkey[CHACHA_BLOCKBYTES];
rspamd_sig_t mac;
- chacha_state s;
+ ALIGN(64) chacha_state s;
gsize r;
gboolean ret = TRUE;