summaryrefslogtreecommitdiff
path: root/des.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2010-07-05 21:47:56 +0200
committerNiels Möller <nisse@lysator.liu.se>2010-07-05 21:47:56 +0200
commit053bf073344ab3670b23e2a4c2c19483225632c6 (patch)
treef7c28fcc285924ebd620828b4395a11ee7674028 /des.h
parent3fb24d9ff612538dd25c91ce56db2ebdeb6c3c63 (diff)
downloadnettle-053bf073344ab3670b23e2a4c2c19483225632c6.tar.gz
(enum des_error): Deleted.
(struct des_ctx): Deleted status attribute. (struct des3_ctx): Likewise. Rev: nettle/des.h:1.3
Diffstat (limited to 'des.h')
-rw-r--r--des.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/des.h b/des.h
index 8745e2a0..3f0f9ef2 100644
--- a/des.h
+++ b/des.h
@@ -57,16 +57,12 @@ extern "C" {
/* Expanded key length */
#define _DES_KEY_LENGTH 32
-enum des_error { DES_OK, DES_BAD_PARITY, DES_WEAK_KEY };
-
struct des_ctx
{
uint32_t key[_DES_KEY_LENGTH];
- enum des_error status;
};
-/* On success, returns 1 and sets ctx->status to DES_OK (zero). On
- * error, returns 0 and sets ctx->status accordingly. */
+/* Returns 1 for good keys and 0 for weak keys. */
int
des_set_key(struct des_ctx *ctx, const uint8_t *key);
@@ -92,12 +88,10 @@ des_fix_parity(unsigned length, uint8_t *dst,
struct des3_ctx
{
struct des_ctx des[3];
- enum des_error status;
};
-/* On success, returns 1 and sets ctx->status to DES_OK (zero). On
- * error, returns 0 and sets ctx->status accordingly. */
+/* Returns 1 for good keys and 0 for weak keys. */
int
des3_set_key(struct des3_ctx *ctx, const uint8_t *key);