X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fbf%2Fbf_ecb.c;h=1607cefa32cb615418265add214fb92d0c73a29b;hb=d0666f289ac013094bbbf547bfbcd616199b7d2d;hp=fd362b7cc9a1412ad9e68f3374628f7d7beb9a55;hpb=b4cadc6e1343c01b06613053a90ed2ee85e65090;p=openssl.git diff --git a/crypto/bf/bf_ecb.c b/crypto/bf/bf_ecb.c index fd362b7cc9..1607cefa32 100644 --- a/crypto/bf/bf_ecb.c +++ b/crypto/bf/bf_ecb.c @@ -56,18 +56,18 @@ * [including the GNU Public Licence.] */ -#include "blowfish.h" +#include #include "bf_locl.h" -#include "opensslv.h" +#include /* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' - * (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, + * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) */ -char *BF_version="BlowFish" OPENSSL_VERSION_PTEXT; +const char BF_version[]="Blowfish" OPENSSL_VERSION_PTEXT; -char *BF_options() +const char *BF_options(void) { #ifdef BF_PTR return("blowfish(ptr)"); @@ -78,20 +78,17 @@ char *BF_options() #endif } -void BF_ecb_encrypt(in, out, ks, encrypt) -unsigned char *in; -unsigned char *out; -BF_KEY *ks; -int encrypt; +void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, + const BF_KEY *key, int encrypt) { BF_LONG l,d[2]; n2l(in,l); d[0]=l; n2l(in,l); d[1]=l; if (encrypt) - BF_encrypt(d,ks); + BF_encrypt(d,key); else - BF_decrypt(d,ks); + BF_decrypt(d,key); l=d[0]; l2n(l,out); l=d[1]; l2n(l,out); l=d[0]=d[1]=0;