Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nettle
nettle
Commits
ef8b4e8e
Commit
ef8b4e8e
authored
Feb 25, 2004
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
cbc.c
View file @
ef8b4e8e
...
...
@@ -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
)
...
...
cbc.h
View file @
ef8b4e8e
...
...
@@ -35,17 +35,17 @@
/* 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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment