X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fdes%2Fecb_enc.c;h=784aa5ba23d2c3cc424ca3999229d3b34191b2eb;hp=573a9f6bc955b323652fe3fc0eb4bb659f0d451e;hb=721a5e83f92d07e2f76355e2128b4dae45f2d50d;hpb=e778802f53c8d47e96a6e4cbc776eb6e1d4c461a diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c index 573a9f6bc9..784aa5ba23 100644 --- a/crypto/des/ecb_enc.c +++ b/crypto/des/ecb_enc.c @@ -57,13 +57,15 @@ */ #include "des_locl.h" +#include "des_ver.h" #include "spr.h" -#include "opensslv.h" +#include +#include -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" OPENSSL_VERSION_PTEXT; +OPENSSL_GLOBAL const char *DES_version="DES" OPENSSL_VERSION_PTEXT; -const char *des_options(void) +const char *DES_options(void) { static int init=1; static char buf[32]; @@ -72,7 +74,6 @@ const char *des_options(void) { const char *ptr,*unroll,*risc,*size; - init=0; #ifdef DES_PTR ptr="ptr"; #else @@ -97,26 +98,26 @@ const char *des_options(void) size="int"; else size="long"; - sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size); + BIO_snprintf(buf,sizeof 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; - des_encrypt(ll,ks,enc); + DES_encrypt1(ll,ks,enc); l=ll[0]; l2c(l,out); l=ll[1]; l2c(l,out); l=ll[0]=ll[1]=0; } -