math/mpreduce.h: Missing include files.
[u/mdw/catacomb] / symm / blowfish.c
index 4bfb84d..c4903c1 100644 (file)
 #include <mLib/bits.h>
 
 #include "blowfish.h"
-#include "blowfish-tab.h"
 #include "blkc.h"
 #include "gcipher.h"
 #include "paranoia.h"
 
 /*----- Global variables --------------------------------------------------*/
 
-static const blowfish_ctx ikey = BLOWFISH_IKEY;
+extern const blowfish_ctx blowfish_ikey;
 
 const octet blowfish_keysz[] = { KSZ_RANGE, BLOWFISH_KEYSZ, 1, 56, 1 };
 
@@ -119,7 +118,7 @@ void blowfish_init(blowfish_ctx *k, const void *buf, size_t sz)
 
   /* --- Copy the initial value over --- */
 
-  memcpy(k, &ikey, sizeof(ikey));
+  *k = blowfish_ikey;
 
   /* --- Initialize the %$P$% array --- */