HAVAL Class Reference

#include <haval.h>

Inheritance diagram for HAVAL:

IteratedHash< T_HashWordType, T_Endianness, T_BlockSize, T_Base > IteratedHashBase< T_HashWordType, T_Base > HAVAL3 HAVAL4 HAVAL5 List of all members.

Detailed Description

HAVAL

Warning:
HAVAL with 128-bit or 160-bit output is considered insecure, and should not be used unless you absolutely need it for compatibility.

Definition at line 11 of file haval.h.

Public Types

enum  { HAVAL_VERSION = 1 }
typedef T_Endianness ByteOrderClass
typedef T_HashWordType HashWordType

Public Member Functions

 HAVAL (unsigned int digestSize=DIGESTSIZE, unsigned int passes=3)
 digestSize can be 16, 20, 24, 28, or 32 (Default=32)
pass can be 3, 4 or 5 (Default=3)
void TruncatedFinal (byte *hash, size_t size)
unsigned int DigestSize () const
std::string AlgorithmName () const
ByteOrder GetByteOrder () const
unsigned int BlockSize () const
unsigned int OptimalBlockSize () const
unsigned int OptimalDataAlignment () const
void Update (const byte *input, size_t length)
byte * CreateUpdateSpace (size_t &size)
void Restart ()

Static Public Member Functions

static const char * StaticAlgorithmName ()
static void CorrectEndianess (HashWordType *out, const HashWordType *in, size_t byteCount)

Static Public Attributes

static const int DIGESTSIZE = 32
static const int BLOCKSIZE = T_BlockSize
static CompileAssert<((T_BlockSize
&(T_BlockSize-1))==0)> 
cryptopp_assert___LINE__

Protected Member Functions

void Init ()
void Tailor (unsigned int FPTLEN)
void HashEndianCorrectedBlock (const word32 *in)
void SetBlockSize (unsigned int blockSize)
void SetStateSize (unsigned int stateSize)
T_HashWordType GetBitCountHi () const
T_HashWordType GetBitCountLo () const
void PadLastBlock (unsigned int lastBlockSize, byte padFirst=0x80)
virtual void HashEndianCorrectedBlock (const HashWordType *data)=0
virtual size_t HashMultipleBlocks (const T_HashWordType *input, size_t length)
void HashBlock (const HashWordType *input)

Protected Attributes

const unsigned int digestSize
const unsigned int pass
SecBlock< T_HashWordType > m_data
SecBlock< T_HashWordType > m_digest

Static Protected Attributes

static const unsigned int wi2 [32]
static const unsigned int wi3 [32]
static const unsigned int wi4 [32]
static const unsigned int wi5 [32]
static const word32 mc2 [32]
static const word32 mc3 [32]
static const word32 mc4 [32]
static const word32 mc5 [32]


The documentation for this class was generated from the following files:
Generated on Sat Dec 23 02:07:25 2006 for Crypto++ by  doxygen 1.5.1-p1