Some more source tree cleanups (removed obsolete files crypto/bf/asm/bf586.pl,
[openssl.git] / crypto / bf / blowfish.h
index 24ec8182181ae29db8c77e8388b7dc5a48d8cb48..23a2bd7d1eeb6ddf961d63f16d32fc8c342f28a5 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/bf/blowfish.h */
-/* 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
@@ -70,7 +70,15 @@ extern "C" {
  * the Alpha, otherwise they will not.  Strangly using the '8 byte'
  * BF_LONG and the default 'non-pointer' inner loop is the best configuration
  * for the Alpha */
-#define BF_LONG unsigned long
+#if defined(__sgi)
+#  if (_MIPS_SZLONG==64)
+#    define BF_LONG unsigned int
+#  else
+#    define BF_LONG unsigned long
+#  endif
+#else
+#  define BF_LONG unsigned long
+#endif
 
 #define BF_ROUNDS      16
 #define BF_BLOCK       8
@@ -86,7 +94,8 @@ typedef struct bf_key_st
 void BF_set_key(BF_KEY *key, int len, unsigned char *data);
 void BF_ecb_encrypt(unsigned char *in,unsigned char *out,BF_KEY *key,
        int enc);
-void BF_encrypt(BF_LONG *data,BF_KEY *key,int enc);
+void BF_encrypt(BF_LONG *data,BF_KEY *key);
+void BF_decrypt(BF_LONG *data,BF_KEY *key);
 void BF_cbc_encrypt(unsigned char *in, unsigned char *out, long length,
        BF_KEY *ks, unsigned char *iv, int enc);
 void BF_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
@@ -100,6 +109,7 @@ char *BF_options(void);
 void BF_set_key();
 void BF_ecb_encrypt();
 void BF_encrypt();
+void BF_decrypt();
 void BF_cbc_encrypt();
 void BF_cfb64_encrypt();
 void BF_ofb64_encrypt();