Since there has been reports of clashes between OpenSSL's
[openssl.git] / crypto / des / des.h
index 10c04912bbb09481ad8af9926182723d9b0da7f0..96222c30bef63d31d25dfa7c68e7e970646e655a 100644 (file)
@@ -59,7 +59,7 @@
 #ifndef HEADER_DES_H
 #define HEADER_DES_H
 
-#ifdef NO_DES
+#ifdef OPENSSL_NO_DES
 #error DES is disabled.
 #endif
 
 #include <openssl/opensslconf.h> /* DES_LONG */
 #include <openssl/e_os2.h>     /* OPENSSL_EXTERN */
 
+#ifdef OPENSSL_BUILD_SHLIBCRYPTO
+# undef OPENSSL_EXTERN
+# define OPENSSL_EXTERN OPENSSL_EXPORT
+#endif
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -111,8 +116,10 @@ typedef struct des_ks_struct
 #define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
        des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
 
-OPENSSL_EXTERN int des_check_key;      /* defaults to false */
-OPENSSL_EXTERN int des_rw_mode;                /* defaults to DES_PCBC_MODE */
+OPENSSL_DECLARE_GLOBAL(int,des_check_key);     /* defaults to false */
+#define des_check_key OPENSSL_GLOBAL_REF(des_check_key)
+OPENSSL_DECLARE_GLOBAL(int,des_rw_mode);       /* defaults to DES_PCBC_MODE */
+#define des_rw_mode OPENSSL_GLOBAL_REF(des_rw_mode)
 
 const char *des_options(void);
 void des_ecb3_encrypt(const_des_cblock *input, des_cblock *output,
@@ -146,14 +153,14 @@ void des_ecb_encrypt(const_des_cblock *input,des_cblock *output,
        Data is a pointer to 2 unsigned long's and ks is the
        des_key_schedule to use.  enc, is non zero specifies encryption,
        zero if decryption. */
-void des_encrypt(DES_LONG *data,des_key_schedule ks, int enc);
+void des_encrypt1(DES_LONG *data,des_key_schedule ks, int enc);
 
-/*     This functions is the same as des_encrypt() except that the DES
+/*     This functions is the same as des_encrypt1() except that the DES
        initial permutation (IP) and final permutation (FP) have been left
-       out.  As for des_encrypt(), you should not use this function.
+       out.  As for des_encrypt1(), you should not use this function.
        It is used by the routines in the library that implement triple DES.
        IP() des_encrypt2() des_encrypt2() des_encrypt2() FP() is the same
-       as des_encrypt() des_encrypt() des_encrypt() except faster :-). */
+       as des_encrypt1() des_encrypt1() des_encrypt1() except faster :-). */
 void des_encrypt2(DES_LONG *data,des_key_schedule ks, int enc);
 
 void des_encrypt3(DES_LONG *data, des_key_schedule ks1,