summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bf/bf_ecb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bf/bf_ecb.c')
-rw-r--r--src/lib/libcrypto/bf/bf_ecb.c20
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
67char *BF_version="BlowFish part of SSLeay 0.9.0b 29-Jun-1998"; 68const char *BF_version="Blowfish" OPENSSL_VERSION_PTEXT;
68 69
69char *BF_options() 70const 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
80void BF_ecb_encrypt(in, out, ks, encrypt) 81void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
81unsigned char *in; 82 const BF_KEY *key, int encrypt)
82unsigned char *out;
83BF_KEY *ks;
84int 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;