Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marcus Hoffmann
nettle
Commits
1dd087d0
Commit
1dd087d0
authored
Feb 16, 2011
by
Niels Möller
Browse files
(CBC_ENCRYPT): Avoid using NULL; we don't ensure that it
is defined. (CBC_DECRYPT): Likewise. Rev: nettle/cbc.h:1.3
parent
53f5da92
Changes
1
Hide whitespace changes
Inline
Side-by-side
cbc.h
View file @
1dd087d0
...
...
@@ -54,15 +54,16 @@ cbc_decrypt(void *ctx, nettle_crypt_func f,
#define CBC_SET_IV(ctx, data) \
memcpy((ctx)->iv, (data), sizeof((ctx)->iv))
/* NOTE: Avoid using NULL, as we don't include anything defining it. */
#define CBC_ENCRYPT(self, f, length, dst, src) \
(0 ? ((f)(&(self)->ctx, 0,
NULL, NULL
)) \
(0 ? ((f)(&(self)->ctx, 0,
(void *)0, (void *)0
)) \
: cbc_encrypt((void *) &(self)->ctx, \
(nettle_crypt_func *) (f), \
sizeof((self)->iv), (self)->iv, \
(length), (dst), (src)))
#define CBC_DECRYPT(self, f, length, dst, src) \
(0 ? ((f)(&(self)->ctx, 0,
NULL, NULL
)) \
(0 ? ((f)(&(self)->ctx, 0,
(void *)0, (void *)0
)) \
: cbc_decrypt((void *) &(self)->ctx, \
(nettle_crypt_func *) (f), \
sizeof((self)->iv), (self)->iv, \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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