projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
evp: prevent underflow in base64 decoding
[openssl.git]
/
crypto
/
bf
/
bf_ecb.c
diff --git
a/crypto/bf/bf_ecb.c
b/crypto/bf/bf_ecb.c
index fd362b7cc9a1412ad9e68f3374628f7d7beb9a55..1607cefa32cb615418265add214fb92d0c73a29b 100644
(file)
--- a/
crypto/bf/bf_ecb.c
+++ b/
crypto/bf/bf_ecb.c
@@
-56,18
+56,18
@@
* [including the GNU Public Licence.]
*/
* [including the GNU Public Licence.]
*/
-#include
"blowfish.h"
+#include
<openssl/blowfish.h>
#include "bf_locl.h"
#include "bf_locl.h"
-#include
"opensslv.h"
+#include
<openssl/opensslv.h>
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
- * (From LECTURE NOTES IN CO
I
MPUTER 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)
*/
* CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
*/
-c
har *BF_version="BlowF
ish" OPENSSL_VERSION_PTEXT;
+c
onst char BF_version[]="Blowf
ish" OPENSSL_VERSION_PTEXT;
-c
har *BF_options(
)
+c
onst char *BF_options(void
)
{
#ifdef BF_PTR
return("blowfish(ptr)");
{
#ifdef BF_PTR
return("blowfish(ptr)");
@@
-78,20
+78,17
@@
char *BF_options()
#endif
}
#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_LONG l,d[2];
n2l(in,l); d[0]=l;
n2l(in,l); d[1]=l;
if (encrypt)
- BF_encrypt(d,k
s
);
+ BF_encrypt(d,k
ey
);
else
else
- BF_decrypt(d,k
s
);
+ BF_decrypt(d,k
ey
);
l=d[0]; l2n(l,out);
l=d[1]; l2n(l,out);
l=d[0]=d[1]=0;
l=d[0]; l2n(l,out);
l=d[1]; l2n(l,out);
l=d[0]=d[1]=0;