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
Dmitry Baryshkov
nettle
Commits
d0c86a10
Commit
d0c86a10
authored
Jan 25, 2014
by
Niels Möller
Browse files
Delete length argument from GCM_SET_KEY.
parent
b85125a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
d0c86a10
2014-01-25 Niels Möller <nisse@lysator.liu.se>
* gcm.h (GCM_SET_KEY): Deleted length argument.
* gcm-aes.c (gcm_aes_set_key): Use aes_set_encrypt_key and
gcm_set_key, can no longer use GCM_SET_KEY macro.
2014-01-23 Niels Möller <nisse@lysator.liu.se>
* testsuite/gcm-test.c (test_main): Use the correct
...
...
gcm-aes.c
View file @
d0c86a10
...
...
@@ -32,7 +32,9 @@
void
gcm_aes_set_key
(
struct
gcm_aes_ctx
*
ctx
,
size_t
length
,
const
uint8_t
*
key
)
{
GCM_SET_KEY
(
ctx
,
aes_set_encrypt_key
,
aes_encrypt
,
length
,
key
);
aes_set_encrypt_key
(
&
ctx
->
cipher
,
length
,
key
);
gcm_set_key
(
&
ctx
->
key
,
&
ctx
->
cipher
,
(
nettle_crypt_func
*
)
aes_encrypt
);
}
void
...
...
gcm.h
View file @
d0c86a10
...
...
@@ -115,9 +115,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key,
{ type cipher; struct gcm_key key; struct gcm_ctx gcm; }
/* NOTE: Avoid using NULL, as we don't include anything defining it. */
#define GCM_SET_KEY(ctx, set_key, encrypt,
length, data)
\
#define GCM_SET_KEY(ctx, set_key, encrypt,
key)
\
do { \
(set_key)(&(ctx)->cipher, (
length), (data
)); \
(set_key)(&(ctx)->cipher, (
key
));
\
if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \
gcm_set_key(&(ctx)->key, &(ctx)->cipher, \
(nettle_crypt_func *) (encrypt)); \
...
...
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