Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TigerTree.cpp File Reference

#include "StdAfx.h"
#include "Shareaza.h"
#include "TigerTree.h"

Go to the source code of this file.

Defines

#define BLOCK_SIZE   1024
#define STACK_SIZE   64
#define TIGER_SIZE   24
#define NEW_TIGER_ALG
#define PASSES   3
#define t1   (m_pTable)
#define t2   (m_pTable+256)
#define t3   (m_pTable+256*2)
#define t4   (m_pTable+256*3)
#define save_abc
#define round(a, b, c, x, mul)
#define pass(a, b, c, mul)
#define key_schedule
#define feedforward
#define compress

Functions

void TigerTree_Tiger_p5 (WORD64 *str, WORD64 *state)
void TigerTree_Tiger_MMX (WORD64 *str, WORD64 *state)
void TigerTree_Tiger_SSE2 (WORD64 *str, WORD64 *state)
int GetCPUIDFlags ()

Variables

void(* pTiger )(WORD64 *, WORD64 *)


Define Documentation

#define BLOCK_SIZE   1024
 

Definition at line 32 of file TigerTree.cpp.

#define compress
 

Value:

save_abc \
      for(pass_no=0; pass_no<PASSES; pass_no++) { \
        if(pass_no != 0) {key_schedule} \
        pass(a,b,c,(pass_no==0?5:pass_no==1?7:9)); \
        tmpa=a; a=c; c=b; b=tmpa;} \
      feedforward

Definition at line 856 of file TigerTree.cpp.

Referenced by CZLib::Compress().

#define feedforward
 

Value:

a ^= aa; \
      b -= bb; \
      c += cc;

Definition at line 851 of file TigerTree.cpp.

#define key_schedule
 

Value:

x0 -= x7 ^ 0xA5A5A5A5A5A5A5A5; \
      x1 ^= x0; \
      x2 += x1; \
      x3 -= x2 ^ ((~x1)<<19); \
      x4 ^= x3; \
      x5 += x4; \
      x6 -= x5 ^ ((~x4)>>23); \
      x7 ^= x6; \
      x0 += x7; \
      x1 -= x0 ^ ((~x7)<<19); \
      x2 ^= x1; \
      x3 += x2; \
      x4 -= x3 ^ ((~x2)>>23); \
      x5 ^= x4; \
      x6 += x5; \
      x7 -= x6 ^ 0x0123456789ABCDEF;

Definition at line 833 of file TigerTree.cpp.

#define NEW_TIGER_ALG
 

Definition at line 36 of file TigerTree.cpp.

#define pass a,
b,
c,
mul   ) 
 

Value:

round(a,b,c,x0,mul) \
      round(b,c,a,x1,mul) \
      round(c,a,b,x2,mul) \
      round(a,b,c,x3,mul) \
      round(b,c,a,x4,mul) \
      round(c,a,b,x5,mul) \
      round(a,b,c,x6,mul) \
      round(b,c,a,x7,mul)

Definition at line 823 of file TigerTree.cpp.

Referenced by CDownloadsCtrl::BubbleSortDownloads().

#define PASSES   3
 

Definition at line 799 of file TigerTree.cpp.

#define round a,
b,
c,
x,
mul   ) 
 

Value:

c ^= x; \
      a -= t1[(BYTE)(c)] ^ \
           t2[(BYTE)(((DWORD)(c))>>(2*8))] ^ \
           t3[(BYTE)((c)>>(4*8))] ^ \
           t4[(BYTE)(((DWORD)((c)>>(4*8)))>>(2*8))] ; \
      b += t4[(BYTE)(((DWORD)(c))>>(1*8))] ^ \
           t3[(BYTE)(((DWORD)(c))>>(3*8))] ^ \
           t2[(BYTE)(((DWORD)((c)>>(4*8)))>>(1*8))] ^ \
           t1[(BYTE)(((DWORD)((c)>>(4*8)))>>(3*8))]; \
      b *= mul;

Definition at line 811 of file TigerTree.cpp.

#define save_abc
 

Value:

aa = a; \
      bb = b; \
      cc = c;

Definition at line 806 of file TigerTree.cpp.

#define STACK_SIZE   64
 

Definition at line 33 of file TigerTree.cpp.

Referenced by CTigerTree::BeginBlockTest(), and CTigerTree::BeginFile().

#define t1   (m_pTable)
 

Definition at line 801 of file TigerTree.cpp.

#define t2   (m_pTable+256)
 

Definition at line 802 of file TigerTree.cpp.

#define t3   (m_pTable+256*2)
 

Definition at line 803 of file TigerTree.cpp.

#define t4   (m_pTable+256*3)
 

Definition at line 804 of file TigerTree.cpp.

#define TIGER_SIZE   24
 

Definition at line 34 of file TigerTree.cpp.

Referenced by CTigerTree::CheckIntegrity(), CTigerTree::Collapse(), CTigerTree::FinishFile(), CTigerTree::FromBytes(), CTigerTree::GetRoot(), CTigerTree::GetSerialSize(), CTigerNode::HashToString(), CTigerTree::Serialize(), CTigerTree::Tiger(), and CTigerTree::ToBytes().


Function Documentation

int GetCPUIDFlags  )  [inline]
 

Definition at line 46 of file TigerTree.cpp.

Referenced by CTigerTree::CTigerTree().

void TigerTree_Tiger_MMX WORD64 str,
WORD64 state
 

void TigerTree_Tiger_p5 WORD64 str,
WORD64 state
 

Referenced by CTigerTree::CTigerTree().

void TigerTree_Tiger_SSE2 WORD64 str,
WORD64 state
 

Referenced by CTigerTree::CTigerTree().


Variable Documentation

void(* pTiger)(WORD64 *, WORD64 *)
 

Definition at line 44 of file TigerTree.cpp.

Referenced by CDownloadEditDlg::Commit(), CDownloads::FindByURN(), CCollectionFile::FindByURN(), CMatchListView::GetNext(), CLibraryFile::GetTigerTree(), CLibraryBuilder::HashFile(), CBTInfo::LoadTorrentTree(), CLibraryMaps::LookupFileByURN(), CNewSearchDlg::OnChangeSearch(), and CDownloadTransferHTTP::OnHeaderLine().


Generated on Thu Dec 15 10:40:00 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2