#if 0 out deleted (?) functions to stop Win32 DLL
[openssl.git] / crypto / des / des.h
index cf536e642895ca6bec0f320cebea51b94788cf59..77c75055656dccd3c9ad6b3e966936500f573c0e 100644 (file)
@@ -59,7 +59,7 @@
 #ifndef HEADER_DES_H
 #define HEADER_DES_H
 
 #ifndef HEADER_DES_H
 #define HEADER_DES_H
 
-#ifdef NO_DES
+#ifdef OPENSSL_NO_DES
 #error DES is disabled.
 #endif
 
 #error DES is disabled.
 #endif
 
 #error <openssl/des.h> replaces <kerberos/des.h>.
 #endif
 
 #error <openssl/des.h> replaces <kerberos/des.h>.
 #endif
 
-#include <stdio.h>
 #include <openssl/opensslconf.h> /* DES_LONG */
 #include <openssl/e_os2.h>     /* OPENSSL_EXTERN */
 
 #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
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -112,9 +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))
 
 #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_EXTERN int des_set_weak_key_flag; /* set the weak key flag */
+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,
 
 const char *des_options(void);
 void des_ecb3_encrypt(const_des_cblock *input, des_cblock *output,
@@ -148,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. */
        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
        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
        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,
 void des_encrypt2(DES_LONG *data,des_key_schedule ks, int enc);
 
 void des_encrypt3(DES_LONG *data, des_key_schedule ks1,
@@ -205,7 +210,9 @@ int des_random_key(des_cblock *ret);
 int des_read_password(des_cblock *key,const char *prompt,int verify);
 int des_read_2passwords(des_cblock *key1,des_cblock *key2,
                        const char *prompt,int verify);
 int des_read_password(des_cblock *key,const char *prompt,int verify);
 int des_read_2passwords(des_cblock *key1,des_cblock *key2,
                        const char *prompt,int verify);
+#if 0
 int des_read_pw_string(char *buf,int length,const char *prompt,int verify);
 int des_read_pw_string(char *buf,int length,const char *prompt,int verify);
+#endif
 void des_set_odd_parity(des_cblock *key);
 int des_check_key_parity(const_des_cblock *key);
 int des_is_weak_key(const_des_cblock *key);
 void des_set_odd_parity(des_cblock *key);
 int des_check_key_parity(const_des_cblock *key);
 int des_is_weak_key(const_des_cblock *key);
@@ -223,8 +230,9 @@ void des_cfb64_encrypt(const unsigned char *in,unsigned char *out,long length,
                       int enc);
 void des_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length,
                       des_key_schedule schedule,des_cblock *ivec,int *num);
                       int enc);
 void des_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length,
                       des_key_schedule schedule,des_cblock *ivec,int *num);
+#if 0
 int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify);
 int des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify);
-
+#endif
 /* The following definitions provide compatibility with the MIT Kerberos
  * library. The des_key_schedule structure is not binary compatible. */
 
 /* The following definitions provide compatibility with the MIT Kerberos
  * library. The des_key_schedule structure is not binary compatible. */