]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(cbc_encrypt, cbc_decrypt): Use a _const_ void *ctx argument.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 25 Feb 2004 22:00:38 +0000 (23:00 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 25 Feb 2004 22:00:38 +0000 (23:00 +0100)
Rev: src/nettle/cbc.c:1.9
Rev: src/nettle/cbc.h:1.6

cbc.c
cbc.h

diff --git a/cbc.c b/cbc.c
index 72b71c7126bf83717b5a412f1a57ab7f5f0c3d10..3312c293e541ee7f25ea1276f39304027029a9ff 100644 (file)
--- a/cbc.c
+++ b/cbc.c
@@ -37,9 +37,9 @@
 #include "nettle-internal.h"
 
 void
-cbc_encrypt(void *ctx, void (*f)(void *ctx,
-                                unsigned length, uint8_t *dst,
-                                const uint8_t *src),
+cbc_encrypt(const void *ctx, void (*f)(const void *ctx,
+                                      unsigned length, uint8_t *dst,
+                                      const uint8_t *src),
            unsigned block_size, uint8_t *iv,
            unsigned length, uint8_t *dst,
            const uint8_t *src)
@@ -56,9 +56,9 @@ cbc_encrypt(void *ctx, void (*f)(void *ctx,
 
 /* Reqires that dst != src */
 static void
-cbc_decrypt_internal(void *ctx, void (*f)(void *ctx,
-                                         unsigned length, uint8_t *dst,
-                                         const uint8_t *src),
+cbc_decrypt_internal(const void *ctx, void (*f)(const void *ctx,
+                                               unsigned length, uint8_t *dst,
+                                               const uint8_t *src),
                     unsigned block_size, uint8_t *iv,
                     unsigned length, uint8_t *dst,
                     const uint8_t *src)
@@ -80,9 +80,9 @@ cbc_decrypt_internal(void *ctx, void (*f)(void *ctx,
 #define CBC_BUFFER_LIMIT 4096
 
 void
-cbc_decrypt(void *ctx, void (*f)(void *ctx,
-                                unsigned length, uint8_t *dst,
-                                const uint8_t *src),
+cbc_decrypt(const void *ctx, void (*f)(const void *ctx,
+                                      unsigned length, uint8_t *dst,
+                                      const uint8_t *src),
            unsigned block_size, uint8_t *iv,
            unsigned length, uint8_t *dst,
            const uint8_t *src)
diff --git a/cbc.h b/cbc.h
index c2043768e263337e6c44d39953f16c4ab42139cf..740e9e194e46d18b9b0b08a5e63ed4126fe62c72 100644 (file)
--- a/cbc.h
+++ b/cbc.h
 /* Uses a void * for cipher contexts. */
 
 void
-cbc_encrypt(void *ctx, void (*f)(void *ctx,
-                                unsigned length, uint8_t *dst,
-                                const uint8_t *src),
+cbc_encrypt(const void *ctx, void (*f)(const void *ctx,
+                                      unsigned length, uint8_t *dst,
+                                      const uint8_t *src),
            unsigned block_size, uint8_t *iv,
            unsigned length, uint8_t *dst,
            const uint8_t *src);
 
 void
-cbc_decrypt(void *ctx, void (*f)(void *ctx,
-                                unsigned length, uint8_t *dst,
-                                const uint8_t *src),
+cbc_decrypt(const void *ctx, void (*f)(const void *ctx,
+                                      unsigned length, uint8_t *dst,
+                                      const uint8_t *src),
            unsigned block_size, uint8_t *iv,
            unsigned length, uint8_t *dst,
            const uint8_t *src);