X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbf%2Fbf_ecb.c;h=7abe20979d49dd212c8ca7b6e3e69b759d9c0241;hp=7840352dc36a5cb6b92cdbdcc9bd7b289aaa86f2;hb=bb8e7ab7563a87dea090823ab13b2a6685f17c98;hpb=eda1f21f1af8b6f77327e7b37573af9c1ba73726 diff --git a/crypto/bf/bf_ecb.c b/crypto/bf/bf_ecb.c index 7840352dc3..7abe20979d 100644 --- a/crypto/bf/bf_ecb.c +++ b/crypto/bf/bf_ecb.c @@ -1,5 +1,5 @@ /* crypto/bf/bf_ecb.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -58,15 +58,16 @@ #include "blowfish.h" #include "bf_locl.h" +#include "opensslv.h" /* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' * (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) */ -char *BF_version="BlowFish part of SSLeay 0.8.1b 29-Jun-1998"; +const char *BF_version="BlowFish" OPENSSL_VERSION_PTEXT; -char *BF_options() +const char *BF_options(void) { #ifdef BF_PTR return("blowfish(ptr)"); @@ -77,17 +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(unsigned char *in, unsigned char *out, BF_KEY *ks, + int encrypt) { BF_LONG l,d[2]; n2l(in,l); d[0]=l; n2l(in,l); d[1]=l; - BF_encrypt(d,ks,encrypt); + if (encrypt) + BF_encrypt(d,ks); + else + BF_decrypt(d,ks); l=d[0]; l2n(l,out); l=d[1]; l2n(l,out); l=d[0]=d[1]=0;