summaryrefslogtreecommitdiff
path: root/des.h
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2003-04-12 17:42:20 +0200
committerNiels Möller <nisse@lysator.liu.se>2003-04-12 17:42:20 +0200
commit4fd20960e0ed6712fa89e119bd8c639e303655e1 (patch)
tree853f119938cc410d329e5f33f38bfaa7aac3ed6d /des.h
parentb26c392549490d4d593fbdaa88cac0c3dcd3bfd8 (diff)
downloadnettle-4fd20960e0ed6712fa89e119bd8c639e303655e1.tar.gz
* New name mangling, to reduce the risk of link collisions. All
functions (except memxor) now use a nettle_ or _nettle prefix when seen by the linker. For most functions, the header file that declares a function also use #define to provide a shorter more readable name without the prefix. Rev: src/nettle/aes-internal.h:1.9 Rev: src/nettle/aes.h:1.6 Rev: src/nettle/arcfour.h:1.4 Rev: src/nettle/base16.h:1.2 Rev: src/nettle/base64.h:1.12 Rev: src/nettle/blowfish.h:1.8 Rev: src/nettle/cast128.h:1.4 Rev: src/nettle/cbc.h:1.4 Rev: src/nettle/des.h:1.8 Rev: src/nettle/dsa.h:1.7 Rev: src/nettle/hmac.h:1.5 Rev: src/nettle/knuth-lfib.h:1.2 Rev: src/nettle/md5-compat.h:1.2 Rev: src/nettle/md5.h:1.6 Rev: src/nettle/pgp.h:1.2 Rev: src/nettle/pkcs1.h:1.2 Rev: src/nettle/rsa-compat.h:1.3 Rev: src/nettle/rsa.h:1.22 Rev: src/nettle/serpent.h:1.6 Rev: src/nettle/sexp.h:1.15 Rev: src/nettle/sha.h:1.3 Rev: src/nettle/twofish.h:1.5 Rev: src/nettle/yarrow.h:1.10
Diffstat (limited to 'des.h')
-rw-r--r--des.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/des.h b/des.h
index 9f674736..25168d11 100644
--- a/des.h
+++ b/des.h
@@ -35,15 +35,16 @@
#ifndef NETTLE_DES_H_INCLUDED
#define NETTLE_DES_H_INCLUDED
-/* Namespace mangling.
- *
- * FIXME: In the long run, all nettle symbols should probably have the
- * prefix nettle_, with the appropriate header file defining
- * shorthands. */
+#include <inttypes.h>
+/* Namespace mangling */
#define des_set_key nettle_des_set_key
-
-#include <inttypes.h>
+#define des_encrypt nettle_des_encrypt
+#define des_decrypt nettle_des_decrypt
+#define des_fix_parity nettle_des_fix_parity
+#define des3_set_key nettle_des3_set_key
+#define des3_encrypt nettle_des3_encrypt
+#define des3_decrypt nettle_des3_decrypt
#define DES_KEY_SIZE 8
#define DES_BLOCK_SIZE 8