summaryrefslogtreecommitdiff
path: root/des-compat.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2001-09-11 21:47:48 +0200
committerNiels Möller <nisse@lysator.liu.se>2001-09-11 21:47:48 +0200
commitac6834a2ce26f0b5a8a2d31fbdfac516675f23e0 (patch)
treecafac716d844e64cc98ab5b4f62541bf129d53a9 /des-compat.h
parent61dcb1e1774b53c344dd92c0eee1a76328d0c480 (diff)
downloadnettle-ac6834a2ce26f0b5a8a2d31fbdfac516675f23e0.tar.gz
* des-compat.h: Define DES_ENCRYPT and DES_DECRYPT. Bugfixes.
Rev: src/nettle/des-compat.h:1.5
Diffstat (limited to 'des-compat.h')
-rw-r--r--des-compat.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/des-compat.h b/des-compat.h
index 7d4aabb2..b25312ab 100644
--- a/des-compat.h
+++ b/des-compat.h
@@ -35,9 +35,13 @@
#include "des.h"
-/* FIXME: Some names collides with nettle, so we'll need some ugly symbol
+/* Some names collides with nettle, so we'll need some ugly symbol
* munging */
+#define des_set_key des_compat_set_key
+
+enum { DES_DECRYPT = 0, DES_ENCRYPT = 1 };
+
void des_ecb3_encrypt(const uint8_t *src, uint8_t *dst,
struct des_ctx *k1, struct des_ctx *k2,
struct des_ctx *k3, int enc);
@@ -54,15 +58,13 @@ des_cbc_encrypt(const uint8_t *src, uint8_t *dst, long length,
void
des_3cbc_encrypt(const uint8_t *src, uint8_t *dst, long length,
- struct des_ctx * k1,struct des_ctx *k2, struct des_ctx *k3,
- /* What mode is this, two iv:s? */
+ struct des_ctx * k1, struct des_ctx *k2,
uint8_t *iv1, uint8_t *iv2,
int enc);
void
des_ecb_encrypt(const uint8_t *src, uint8_t *dst, long length,
- struct des_ctx *ctx, uint8_t *iv,
- int enc);
+ struct des_ctx *ctx, int enc);
void
des_ede3_cbc_encrypt(const uint8_t *src, uint8_t *dst, long length,
struct des_ctx * k1,struct des_ctx *k2, struct des_ctx *k3,
@@ -75,10 +77,11 @@ des_set_odd_parity(uint8_t *key);
int
des_set_key(const uint8_t *key, struct des_ctx *ctx);
+/* What's the difference between this and des_set_key */
int
des_key_sched(const uint8_t *key, struct des_ctx *ctx);
int
-des_is_weak_key(const uint8_t key);
+des_is_weak_key(const uint8_t *key);
#endif /* NETTLE_DES_COMPAT_H_INCLUDED */