#include <haval.h>
Inheritance diagram for HAVAL5:
Definition at line 51 of file haval.h.
Public Types | |
enum | { DIGESTSIZE = 32, HAVAL_VERSION = 1 } |
typedef LittleEndian | ByteOrderClass |
typedef IteratedHashBase< word32, HashTransformation >::HashWordType | HashWordType |
Public Member Functions | |
HAVAL5 (unsigned int digestSize=DIGESTSIZE) | |
void | TruncatedFinal (byte *hash, unsigned int size) |
truncated version of Final() | |
unsigned int | DigestSize () const |
size of the hash returned by Final() | |
std::string | AlgorithmName () const |
returns name of this algorithm, not universally implemented yet | |
unsigned int | BlockSize () const |
block size of underlying compression function, or 0 if not block based | |
unsigned int | OptimalBlockSize () const |
input to Update() should have length a multiple of this for optimal speed | |
unsigned int | OptimalDataAlignment () const |
returns how input should be aligned for optimal performance | |
void | Update (const byte *input, unsigned int length) |
process more input | |
byte * | CreateUpdateSpace (unsigned int &size) |
request space to write input into | |
void | Restart () |
discard the current state, and restart with a new message | |
virtual void | Final (byte *digest) |
compute hash for current message, then restart for a new message | |
virtual void | CalculateDigest (byte *digest, const byte *input, unsigned int length) |
use this if your input is in one piece and you don't want to call Update() and Final() separately | |
virtual bool | Verify (const byte *digest) |
verify that digest is a valid digest for the current message, then reinitialize the object | |
virtual bool | VerifyDigest (const byte *digest, const byte *input, unsigned int length) |
use this if your input is in one piece and you don't want to call Update() and Verify() separately | |
virtual void | CalculateTruncatedDigest (byte *digest, unsigned int digestSize, const byte *input, unsigned int length) |
truncated version of CalculateDigest() | |
virtual bool | TruncatedVerify (const byte *digest, unsigned int digestLength) |
truncated version of Verify() | |
virtual bool | VerifyTruncatedDigest (const byte *digest, unsigned int digestLength, const byte *input, unsigned int length) |
truncated version of VerifyDigest() | |
virtual Clonable * | Clone () const |
this is not implemented by most classes yet | |
Static Public Member Functions | |
void | Transform (word32 *buf, const word32 *in) |
const char * | StaticAlgorithmName () |
void | CorrectEndianess (HashWordType *out, const HashWordType *in, unsigned int byteCount) |
Static Public Attributes | |
CompileAssert<((BLOCKSIZE &(BLOCKSIZE-1))==0) | cryptopp_assert___LINE__ ) |
Protected Member Functions | |
void | Init () |
void | Tailor (unsigned int FPTLEN) |
void | HashEndianCorrectedBlock (const word32 *in) |
virtual void | HashEndianCorrectedBlock (const HashWordType *data)=0 |
void | HashBlock (const HashWordType *input) |
virtual void | HashBlock (const word32 *input)=0 |
void | SetBlockSize (unsigned int blockSize) |
void | SetStateSize (unsigned int stateSize) |
word32 | GetBitCountHi () const |
word32 | GetBitCountLo () const |
virtual unsigned int | HashMultipleBlocks (const word32 *input, unsigned int length) |
void | PadLastBlock (unsigned int lastBlockSize, byte padFirst=0x80) |
void | ThrowIfInvalidTruncatedSize (unsigned int size) const |
Protected Attributes | |
const unsigned int | digestSize |
const unsigned int | pass |
SecBlock< word32 > | m_data |
SecBlock< word32 > | m_digest |
Static Protected Attributes | |
const unsigned int | wi2 [32] = { 5,14,26,18,11,28, 7,16, 0,23,20,22, 1,10, 4, 8,30, 3,21, 9,17,24,29, 6,19,12,15,13, 2,25,31,27} |
const unsigned int | wi3 [32] = {19, 9, 4,20,28,17, 8,22,29,14,25,12,24,30,16,26,31,15, 7, 3, 1, 0,18,27,13, 6,21,10,23,11, 5, 2} |
const unsigned int | wi4 [32] = {24, 4, 0,14, 2, 7,28,23,26, 6,30,20,18,25,19, 3,22,11,31,21, 8,27,12, 9, 1,29, 5,15,17,10,16,13} |
const unsigned int | wi5 [32] = {27, 3,21,26,17,11,20,29,19, 0,12, 7,13, 8,31,10, 5, 9,14,30,18, 6,28,24, 2,23,16,22, 4, 1,25,15} |
const word32 | mc2 [32] |
const word32 | mc3 [32] |
const word32 | mc4 [32] |
const word32 | mc5 [32] |
|
compute hash for current message, then restart for a new message
Referenced by PKCS5_PBKDF2_HMAC< T >::DeriveKey(), HashFilter::Put2(), and HMAC_Base::TruncatedFinal(). |
|
verify that digest is a valid digest for the current message, then reinitialize the object Default implementation is to call Final() and do a bitwise comparison between its output and digest. Definition at line 558 of file cryptlib.h. |
|
Initial value: Definition at line 213 of file haval.cpp. |
|
Initial value: Definition at line 219 of file haval.cpp. |
|
Initial value: Definition at line 225 of file haval.cpp. |
|
Initial value: Definition at line 231 of file haval.cpp. |