/[mldonkey]/mldonkey/src/utils/lib/tiger.c
ViewVC logotype

Diff of /mldonkey/src/utils/lib/tiger.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by spiralvoice, Tue Oct 25 09:46:50 2005 UTC revision 1.9 by spiralvoice, Wed Nov 30 23:46:25 2005 UTC
# Line 18  Line 18 
18  */  */
19    
20  #include "tiger.h"  #include "tiger.h"
21    #include <caml/config.h>
 /* Big endian:                                         */  
 #if !(defined(__alpha)||defined(__i386__)||defined(__vax__))  
 #define BIG_ENDIAN  
 #endif  
22    
23  /* The following macro denotes that an optimization    */  /* The following macro denotes that an optimization    */
24  /* for Alpha is required. It is used only for          */  /* for Alpha is required. It is used only for          */
# Line 193  static void static_tiger(word64 *str, wo Line 189  static void static_tiger(word64 *str, wo
189    
190    for(i=length; i>=64; i-=64)    for(i=length; i>=64; i-=64)
191      {      {
192  #ifdef BIG_ENDIAN  #ifdef ARCH_BIG_ENDIAN
193        for(j=0; j<64; j++)        for(j=0; j<64; j++)
194          temp[j^7] = ((byte*)str)[j];          temp[j^7] = ((byte*)str)[j];
195        tiger_compress(((word64*)temp), res);        tiger_compress(((word64*)temp), res);
# Line 203  static void static_tiger(word64 *str, wo Line 199  static void static_tiger(word64 *str, wo
199        str += 8;        str += 8;
200      }      }
201    
202  #ifdef BIG_ENDIAN  #ifdef ARCH_BIG_ENDIAN
203    for(j=0; j<i; j++)    for(j=0; j<i; j++)
204      temp[j^7] = ((byte*)str)[j];      temp[j^7] = ((byte*)str)[j];
205    
# Line 753  word64 table[4*256] = { Line 749  word64 table[4*256] = {
749    
750  void swap_digest(unsigned char *digest)  void swap_digest(unsigned char *digest)
751  {  {
752    #ifdef BIG_ENDIAN    #ifdef ARCH_BIG_ENDIAN
753    {    {
754      int i,j;      int i,j;
755      for(i=0; i<3; i++){      for(i=0; i<3; i++){

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26