It was a very bad idea to use #include "../e_os.h" -- when this occurs
[openssl.git] / crypto / des / ecb_enc.c
index 573a9f6bc955b323652fe3fc0eb4bb659f0d451e..badb7e1149e75c45737db43f7ec105fbe84dd106 100644 (file)
 
 #include "des_locl.h"
 #include "spr.h"
-#include "opensslv.h"
+#include <openssl/opensslv.h>
 
-const char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay";
-const char *DES_version="DES" OPENSSL_VERSION_PTEXT;
+OPENSSL_GLOBAL const char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay";
+OPENSSL_GLOBAL const char *DES_version="DES" OPENSSL_VERSION_PTEXT;
 
 const char *des_options(void)
        {
@@ -72,7 +72,6 @@ const char *des_options(void)
                {
                const char *ptr,*unroll,*risc,*size;
 
-               init=0;
 #ifdef DES_PTR
                ptr="ptr";
 #else
@@ -98,19 +97,20 @@ const char *des_options(void)
                else
                        size="long";
                sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size);
+               init=0;
                }
        return(buf);
        }
                
 
-void des_ecb_encrypt(in, out, ks, enc)
-const des_cblock in;
-des_cblock out;
-des_key_schedule ks;
-int enc;
+void des_ecb_encrypt(const_des_cblock *input, des_cblock *output,
+            des_key_schedule ks,
+            int enc)
        {
        register DES_LONG l;
        DES_LONG ll[2];
+       const unsigned char *in = &(*input)[0];
+       unsigned char *out = &(*output)[0];
 
        c2l(in,l); ll[0]=l;
        c2l(in,l); ll[1]=l;