/* -*-c-*-
*
- * $Id: tiger-base.h,v 1.1 2000/07/15 10:02:43 mdw Exp $
+ * $Id: tiger-base.h,v 1.2 2004/04/08 01:36:15 mdw Exp $
*
* Common definitions 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-base.h,v $
- * Revision 1.1 2000/07/15 10:02:43 mdw
- * Anderson and Biham's Tiger hash function added.
- *
- */
-
#ifndef CATACOMB_TIGER_BASE_H
#define CATACOMB_TIGER_BASE_H
#define TIGER_ROUND(a, b, c, x, n, op) do { \
kludge64 _t; \
XOR64(c, c, x); \
- _t = s[0][U8(LO64(c) >> 0)]; \
+ _t = s[0][U8(LO64(c) >> 0)]; \
XOR64(_t, _t, s[1][U8(LO64(c) >> 16)]); \
XOR64(_t, _t, s[2][U8(HI64(c) >> 0)]); \
XOR64(_t, _t, s[3][U8(HI64(c) >> 16)]); \
SUB64(a, a, _t); \
- _t = s[3][U8(LO64(c) >> 8)]; \
+ _t = s[3][U8(LO64(c) >> 8)]; \
XOR64(_t, _t, s[2][U8(LO64(c) >> 24)]); \
XOR64(_t, _t, s[1][U8(HI64(c) >> 8)]); \
XOR64(_t, _t, s[0][U8(HI64(c) >> 24)]); \