Skip to content
Snippets Groups Projects
Commit 053bf073 authored by Niels Möller's avatar Niels Möller
Browse files

(enum des_error): Deleted.

(struct des_ctx): Deleted status attribute.
(struct des3_ctx): Likewise.

Rev: nettle/des.h:1.3
parent 3fb24d9f
No related branches found
No related tags found
No related merge requests found
...@@ -57,16 +57,12 @@ extern "C" { ...@@ -57,16 +57,12 @@ extern "C" {
/* Expanded key length */ /* Expanded key length */
#define _DES_KEY_LENGTH 32 #define _DES_KEY_LENGTH 32
enum des_error { DES_OK, DES_BAD_PARITY, DES_WEAK_KEY };
struct des_ctx struct des_ctx
{ {
uint32_t key[_DES_KEY_LENGTH]; uint32_t key[_DES_KEY_LENGTH];
enum des_error status;
}; };
/* On success, returns 1 and sets ctx->status to DES_OK (zero). On /* Returns 1 for good keys and 0 for weak keys. */
* error, returns 0 and sets ctx->status accordingly. */
int int
des_set_key(struct des_ctx *ctx, const uint8_t *key); des_set_key(struct des_ctx *ctx, const uint8_t *key);
...@@ -92,12 +88,10 @@ des_fix_parity(unsigned length, uint8_t *dst, ...@@ -92,12 +88,10 @@ des_fix_parity(unsigned length, uint8_t *dst,
struct des3_ctx struct des3_ctx
{ {
struct des_ctx des[3]; struct des_ctx des[3];
enum des_error status;
}; };
/* On success, returns 1 and sets ctx->status to DES_OK (zero). On /* Returns 1 for good keys and 0 for weak keys. */
* error, returns 0 and sets ctx->status accordingly. */
int int
des3_set_key(struct des3_ctx *ctx, const uint8_t *key); des3_set_key(struct des3_ctx *ctx, const uint8_t *key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment