X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/eeccf7a8e367658a05c437b9aee14026a1706535..5278d9afdf1aff9fd6f64073ea42395d756ee58c:/tiger-base.h diff --git a/tiger-base.h b/tiger-base.h index affd4dc..6b6a81e 100644 --- a/tiger-base.h +++ b/tiger-base.h @@ -1,13 +1,13 @@ /* -*-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. * @@ -15,26 +15,18 @@ * 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 @@ -53,12 +45,12 @@ #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)]); \