diff options
Diffstat (limited to 'src/lib/libcrypto/bf/bf_ecb.c')
| -rw-r--r-- | src/lib/libcrypto/bf/bf_ecb.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/libcrypto/bf/bf_ecb.c b/src/lib/libcrypto/bf/bf_ecb.c index 6d16360bd9..341991636f 100644 --- a/src/lib/libcrypto/bf/bf_ecb.c +++ b/src/lib/libcrypto/bf/bf_ecb.c | |||
| @@ -56,17 +56,18 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include "blowfish.h" | 59 | #include <openssl/blowfish.h> |
| 60 | #include "bf_locl.h" | 60 | #include "bf_locl.h" |
| 61 | #include <openssl/opensslv.h> | ||
| 61 | 62 | ||
| 62 | /* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' | 63 | /* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' |
| 63 | * (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, | 64 | * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, |
| 64 | * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) | 65 | * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) |
| 65 | */ | 66 | */ |
| 66 | 67 | ||
| 67 | char *BF_version="BlowFish part of SSLeay 0.9.0b 29-Jun-1998"; | 68 | const char *BF_version="Blowfish" OPENSSL_VERSION_PTEXT; |
| 68 | 69 | ||
| 69 | char *BF_options() | 70 | const char *BF_options(void) |
| 70 | { | 71 | { |
| 71 | #ifdef BF_PTR | 72 | #ifdef BF_PTR |
| 72 | return("blowfish(ptr)"); | 73 | return("blowfish(ptr)"); |
| @@ -77,20 +78,17 @@ char *BF_options() | |||
| 77 | #endif | 78 | #endif |
| 78 | } | 79 | } |
| 79 | 80 | ||
| 80 | void BF_ecb_encrypt(in, out, ks, encrypt) | 81 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, |
| 81 | unsigned char *in; | 82 | const BF_KEY *key, int encrypt) |
| 82 | unsigned char *out; | ||
| 83 | BF_KEY *ks; | ||
| 84 | int encrypt; | ||
| 85 | { | 83 | { |
| 86 | BF_LONG l,d[2]; | 84 | BF_LONG l,d[2]; |
| 87 | 85 | ||
| 88 | n2l(in,l); d[0]=l; | 86 | n2l(in,l); d[0]=l; |
| 89 | n2l(in,l); d[1]=l; | 87 | n2l(in,l); d[1]=l; |
| 90 | if (encrypt) | 88 | if (encrypt) |
| 91 | BF_encrypt(d,ks); | 89 | BF_encrypt(d,key); |
| 92 | else | 90 | else |
| 93 | BF_decrypt(d,ks); | 91 | BF_decrypt(d,key); |
| 94 | l=d[0]; l2n(l,out); | 92 | l=d[0]; l2n(l,out); |
| 95 | l=d[1]; l2n(l,out); | 93 | l=d[1]; l2n(l,out); |
| 96 | l=d[0]=d[1]=0; | 94 | l=d[0]=d[1]=0; |
