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

des-compat.c: Change length argument type from uint32_t to size_t.

(cherry picked from commit f3bbc422)
parent 0a679090
2018-08-09 Niels Möller <nisse@lysator.liu.se>
Backported from master branch.
* des-compat.c (des_compat_des3_encrypt)
(des_compat_des3_decrypt): Change length argument type to size_t.
2017-11-19 Niels Möller <nisse@lysator.liu.se> 2017-11-19 Niels Möller <nisse@lysator.liu.se>
* Released nettle-3.4. * Released nettle-3.4.
......
...@@ -48,7 +48,7 @@ struct des_compat_des3 { const struct des_ctx *keys[3]; }; ...@@ -48,7 +48,7 @@ struct des_compat_des3 { const struct des_ctx *keys[3]; };
static void static void
des_compat_des3_encrypt(struct des_compat_des3 *ctx, des_compat_des3_encrypt(struct des_compat_des3 *ctx,
uint32_t length, uint8_t *dst, const uint8_t *src) size_t length, uint8_t *dst, const uint8_t *src)
{ {
nettle_des_encrypt(ctx->keys[0], length, dst, src); nettle_des_encrypt(ctx->keys[0], length, dst, src);
nettle_des_decrypt(ctx->keys[1], length, dst, dst); nettle_des_decrypt(ctx->keys[1], length, dst, dst);
...@@ -57,7 +57,7 @@ des_compat_des3_encrypt(struct des_compat_des3 *ctx, ...@@ -57,7 +57,7 @@ des_compat_des3_encrypt(struct des_compat_des3 *ctx,
static void static void
des_compat_des3_decrypt(struct des_compat_des3 *ctx, des_compat_des3_decrypt(struct des_compat_des3 *ctx,
uint32_t length, uint8_t *dst, const uint8_t *src) size_t length, uint8_t *dst, const uint8_t *src)
{ {
nettle_des_decrypt(ctx->keys[2], length, dst, src); nettle_des_decrypt(ctx->keys[2], length, dst, src);
nettle_des_encrypt(ctx->keys[1], length, dst, dst); nettle_des_encrypt(ctx->keys[1], length, dst, dst);
......
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