Commit f32fda99 authored by Niels Möller's avatar Niels Möller
Browse files

(CTR_CTX, CTR_CRYPT): Fixed bugs, spotted by Goran K.

Rev: src/nettle/ctr.h:1.2
parent d36beb1b
......@@ -39,14 +39,14 @@ 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, \
: ctr_crypt((void *) &(self)->ctx, \
(nettle_crypt_func) (f), \
sizeof((self)->ctr), (self)->ctr, \
(length), (dst), (src)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment