X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fdes%2Fecb_enc.c;h=b261a8aad9408b27d0e8cef87ac6202421e61d6b;hb=458cddc1042eb91c5bb1e2bffd8fcfe5ee960d4d;hp=acf23fdd00213fac4f58f735333a4764a6aaae7c;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17;p=oweals%2Fopenssl.git diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c index acf23fdd00..b261a8aad9 100644 --- a/crypto/des/ecb_enc.c +++ b/crypto/des/ecb_enc.c @@ -58,20 +58,20 @@ #include "des_locl.h" #include "spr.h" +#include -char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay"; -char *DES_version="DES part of SSLeay 0.9.0b 29-Jun-1998"; +OPENSSL_GLOBAL const char *libdes_version="libdes" OPENSSL_VERSION_PTEXT; +OPENSSL_GLOBAL const char *DES_version="DES" OPENSSL_VERSION_PTEXT; -char *des_options() +const char *des_options(void) { static int init=1; static char buf[32]; if (init) { - char *ptr,*unroll,*risc,*size; + const char *ptr,*unroll,*risc,*size; - init=0; #ifdef DES_PTR ptr="ptr"; #else @@ -97,23 +97,21 @@ char *des_options() else size="long"; sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size); + init=0; } return(buf); } -void des_ecb_encrypt(input, output, ks, enc) -des_cblock (*input); -des_cblock (*output); -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; - register unsigned char *in,*out; DES_LONG ll[2]; + const unsigned char *in = &(*input)[0]; + unsigned char *out = &(*output)[0]; - in=(unsigned char *)input; - out=(unsigned char *)output; c2l(in,l); ll[0]=l; c2l(in,l); ll[1]=l; des_encrypt(ll,ks,enc);