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

* des.c (des_encrypt, des_decrypt): Use a const context pointer.

* des3.c (des3_encrypt, des3_decrypt): Likewise.

Rev: src/nettle/des.c:1.9
Rev: src/nettle/des.h:1.10
Rev: src/nettle/des3.c:1.3
parent ef8b4e8e
...@@ -228,7 +228,7 @@ des_set_key(struct des_ctx *ctx, const uint8_t *key) ...@@ -228,7 +228,7 @@ des_set_key(struct des_ctx *ctx, const uint8_t *key)
} }
void void
des_encrypt(struct des_ctx *ctx, des_encrypt(const struct des_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src) const uint8_t *src)
{ {
...@@ -245,7 +245,7 @@ des_encrypt(struct des_ctx *ctx, ...@@ -245,7 +245,7 @@ des_encrypt(struct des_ctx *ctx,
} }
void void
des_decrypt(struct des_ctx *ctx, des_decrypt(const struct des_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src) const uint8_t *src)
{ {
......
...@@ -66,11 +66,11 @@ int ...@@ -66,11 +66,11 @@ int
des_set_key(struct des_ctx *ctx, const uint8_t *key); des_set_key(struct des_ctx *ctx, const uint8_t *key);
void void
des_encrypt(struct des_ctx *ctx, des_encrypt(const struct des_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src); const uint8_t *src);
void void
des_decrypt(struct des_ctx *ctx, des_decrypt(const struct des_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src); const uint8_t *src);
...@@ -94,12 +94,12 @@ int ...@@ -94,12 +94,12 @@ int
des3_set_key(struct des3_ctx *ctx, const uint8_t *key); des3_set_key(struct des3_ctx *ctx, const uint8_t *key);
void void
des3_encrypt(struct des3_ctx *ctx, des3_encrypt(const struct des3_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src); const uint8_t *src);
void void
des3_decrypt(struct des3_ctx *ctx, des3_decrypt(const struct des3_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src); const uint8_t *src);
#endif /* NETTLE_DES_H_INCLUDED */ #endif /* NETTLE_DES_H_INCLUDED */
...@@ -50,7 +50,7 @@ des3_set_key(struct des3_ctx *ctx, const uint8_t *key) ...@@ -50,7 +50,7 @@ des3_set_key(struct des3_ctx *ctx, const uint8_t *key)
} }
void void
des3_encrypt(struct des3_ctx *ctx, des3_encrypt(const struct des3_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src) const uint8_t *src)
{ {
...@@ -63,9 +63,9 @@ des3_encrypt(struct des3_ctx *ctx, ...@@ -63,9 +63,9 @@ des3_encrypt(struct des3_ctx *ctx,
} }
void void
des3_decrypt(struct des3_ctx *ctx, des3_decrypt(const struct des3_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
const uint8_t *src) const uint8_t *src)
{ {
des_decrypt(&ctx->des[2], des_decrypt(&ctx->des[2],
length, dst, src); length, dst, src);
......
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