]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(CTR_CTX, CTR_CRYPT): Fixed bugs, spotted by Goran K.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 21 Nov 2005 18:24:40 +0000 (19:24 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 21 Nov 2005 18:24:40 +0000 (19:24 +0100)
Rev: src/nettle/ctr.h:1.2

ctr.h

diff --git a/ctr.h b/ctr.h
index 9372b722080c85b2961e7b56133a3dfa30301d62..95c16615ab6be450cd4077b1873a96d6396745f9 100644 (file)
--- a/ctr.h
+++ b/ctr.h
@@ -39,16 +39,16 @@ ctr_crypt(void *ctx, nettle_crypt_func f,
          const uint8_t *src);
 
 #define CTR_CTX(type, size) \
-{ type ctx; uint8_t ctr[size] }
+{ type ctx; uint8_t ctr[size]; }
 
 #define CTR_SET_COUNTER(ctx, data) \
 memcpy((ctx)->ctr, (data), sizeof((ctx)->ctr))
 
 #define CTR_CRYPT(self, f, length, dst, src)           \
 (0 ? ((f)(&(self)->ctx, 0, NULL, NULL))                        \
-   : ctr_encrypt((void *) &(self)->ctx,                        \
-                 (nettle_crypt_func) (f),              \
-                sizeof((self)->ctr), (self)->ctr,      \
-                 (length), (dst), (src)))
+   : ctr_crypt((void *) &(self)->ctx,                  \
+               (nettle_crypt_func) (f),                        \
+              sizeof((self)->ctr), (self)->ctr,        \
+               (length), (dst), (src)))
 
 #endif /* NETTLE_CTR_H_INCLUDED */