diff options
author | Niels Möller <nisse@lysator.liu.se> | 2005-11-21 19:24:40 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2005-11-21 19:24:40 +0100 |
commit | f32fda997b2c8677610278bd88052ba0237de242 (patch) | |
tree | 3dca8307ce20826c351dff592c39888aa3cc9eb1 /ctr.h | |
parent | d36beb1bab7146b5c6cb3cea62bf3355a2180d6e (diff) | |
download | nettle-f32fda997b2c8677610278bd88052ba0237de242.tar.gz |
(CTR_CTX, CTR_CRYPT): Fixed bugs, spotted by Goran K.
Rev: src/nettle/ctr.h:1.2
Diffstat (limited to 'ctr.h')
-rw-r--r-- | ctr.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 */ |