New function and example program computes Fibonacci numbers fairly fast.
[u/mdw/catacomb] / tiger-mktab.c
index c7b27e5..222c523 100644 (file)
@@ -1,13 +1,13 @@
 /* -*-c-*-
  *
- * $Id: tiger-mktab.c,v 1.1 2000/07/15 10:02:43 mdw Exp $
+ * $Id: tiger-mktab.c,v 1.2 2004/04/08 01:36:15 mdw Exp $
  *
  * Generate S-boxes for the Tiger hash function
  *
  * (c) 2000 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Catacomb.
  *
  * it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * Catacomb is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Library General Public
  * License along with Catacomb; if not, write to the Free
  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: tiger-mktab.c,v $
- * Revision 1.1  2000/07/15 10:02:43  mdw
- * Anderson and Biham's Tiger hash function added.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <mLib/bits.h>
@@ -129,7 +121,7 @@ int main(void)
   for (i = 0; i < 4; i++) {
     for (j = 0; j < 256; j++) {
 #ifdef HAVE_UINT64
-      printf("{ 0x%016llxull }", s[i][j]);
+      printf("{ 0x%016llxull }", s[i][j].i);
 #else
       printf("{ 0x%08lx, 0x%08lx }",
             (unsigned long)s[i][j].hi, (unsigned long)s[i][j].lo);
@@ -142,7 +134,7 @@ int main(void)
                                                                        \\\n\
   { ", stdout);
       } else if (j % 2 == 1)
-       fputs(",                \\\n    ", stdout);
+       fputs(",                \\\n    ", stdout);
       else
        fputs(", ", stdout);
     }