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

(cbc_encrypt, cbc_decrypt): Use a _const_ void *ctx argument.

Rev: src/nettle/cbc.c:1.9
Rev: src/nettle/cbc.h:1.6
parent 688f5b22
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "nettle-internal.h" #include "nettle-internal.h"
void void
cbc_encrypt(void *ctx, void (*f)(void *ctx, cbc_encrypt(const void *ctx, void (*f)(const void *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src), const uint8_t *src),
unsigned block_size, uint8_t *iv, unsigned block_size, uint8_t *iv,
...@@ -56,7 +56,7 @@ cbc_encrypt(void *ctx, void (*f)(void *ctx, ...@@ -56,7 +56,7 @@ cbc_encrypt(void *ctx, void (*f)(void *ctx,
/* Reqires that dst != src */ /* Reqires that dst != src */
static void static void
cbc_decrypt_internal(void *ctx, void (*f)(void *ctx, cbc_decrypt_internal(const void *ctx, void (*f)(const void *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src), const uint8_t *src),
unsigned block_size, uint8_t *iv, unsigned block_size, uint8_t *iv,
...@@ -80,7 +80,7 @@ cbc_decrypt_internal(void *ctx, void (*f)(void *ctx, ...@@ -80,7 +80,7 @@ cbc_decrypt_internal(void *ctx, void (*f)(void *ctx,
#define CBC_BUFFER_LIMIT 4096 #define CBC_BUFFER_LIMIT 4096
void void
cbc_decrypt(void *ctx, void (*f)(void *ctx, cbc_decrypt(const void *ctx, void (*f)(const void *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src), const uint8_t *src),
unsigned block_size, uint8_t *iv, unsigned block_size, uint8_t *iv,
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/* Uses a void * for cipher contexts. */ /* Uses a void * for cipher contexts. */
void void
cbc_encrypt(void *ctx, void (*f)(void *ctx, cbc_encrypt(const void *ctx, void (*f)(const void *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src), const uint8_t *src),
unsigned block_size, uint8_t *iv, unsigned block_size, uint8_t *iv,
...@@ -43,7 +43,7 @@ cbc_encrypt(void *ctx, void (*f)(void *ctx, ...@@ -43,7 +43,7 @@ cbc_encrypt(void *ctx, void (*f)(void *ctx,
const uint8_t *src); const uint8_t *src);
void void
cbc_decrypt(void *ctx, void (*f)(void *ctx, cbc_decrypt(const void *ctx, void (*f)(const void *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src), const uint8_t *src),
unsigned block_size, uint8_t *iv, unsigned block_size, uint8_t *iv,
......
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