Fabcoin Core
0.16.2
P2P Digital Currency
|
Iterated hash base class. More...
#include <iterhash.h>
Public Types | |
typedef T_Endianness | ByteOrderClass |
typedef T_HashWordType | HashWordType |
Public Types inherited from IteratedHashBase< T_HashWordType, T_Base > | |
typedef T_HashWordType | HashWordType |
Public Member Functions | |
CRYPTOPP_COMPILE_ASSERT ((T_BlockSize &(T_BlockSize-1))==0) | |
virtual | ~IteratedHash () |
unsigned int | BlockSize () const |
Provides the block size of the hash. More... | |
ByteOrder | GetByteOrder () const |
Provides the byte order of the hash. More... | |
void | CorrectEndianess (HashWordType *out, const HashWordType *in, size_t byteCount) |
Adjusts the byte ordering of the hash. More... | |
Public Member Functions inherited from IteratedHashBase< T_HashWordType, T_Base > | |
IteratedHashBase () | |
Construct an IteratedHashBase. More... | |
unsigned int | OptimalBlockSize () const |
Provides the input block size most efficient for this cipher. More... | |
unsigned int | OptimalDataAlignment () const |
Provides input and output data alignment for optimal performance. More... | |
void | Update (const byte *input, size_t length) |
Updates a hash with additional input. More... | |
byte * | CreateUpdateSpace (size_t &size) |
Requests space which can be written into by the caller. More... | |
void | Restart () |
Restart the hash. More... | |
void | TruncatedFinal (byte *digest, size_t digestSize) |
Computes the hash of the current message. More... | |
Protected Member Functions | |
T_HashWordType * | DataBuf () |
Protected Member Functions inherited from IteratedHashBase< T_HashWordType, T_Base > | |
T_HashWordType | GetBitCountHi () const |
T_HashWordType | GetBitCountLo () const |
void | PadLastBlock (unsigned int lastBlockSize, byte padFirst=0x80) |
virtual void | Init ()=0 |
virtual void | HashEndianCorrectedBlock (const HashWordType *data)=0 |
virtual size_t | HashMultipleBlocks (const T_HashWordType *input, size_t length) |
void | HashBlock (const HashWordType *input) |
virtual T_HashWordType * | StateBuf ()=0 |
Protected Attributes | |
FixedSizeSecBlock< T_HashWordType, T_BlockSize/sizeof(T_HashWordType)> | m_data |
Iterated hash base class.
T_HashWordType | Hash word type |
T_Endianness | Endianness type of hash |
T_BlockSize | Block size of the hash |
T_Base | HashTransformation derived class |
IteratedHash provides a default implementation for block-based iterated hashes
Definition at line 101 of file iterhash.h.
typedef T_Endianness IteratedHash< T_HashWordType, T_Endianness, T_BlockSize, T_Base >::ByteOrderClass |
Definition at line 104 of file iterhash.h.
typedef T_HashWordType IteratedHash< T_HashWordType, T_Endianness, T_BlockSize, T_Base >::HashWordType |
Definition at line 105 of file iterhash.h.
|
inlinevirtual |
Definition at line 111 of file iterhash.h.
|
inline |
Provides the block size of the hash.
BlockSize() returns T_BlockSize
.
Definition at line 116 of file iterhash.h.
|
inline |
Adjusts the byte ordering of the hash.
out | the output buffer |
in | the input buffer |
byteCount | the size of the buffers, in bytes |
CorrectEndianess() calls ConditionalByteReverse() using T_Endianness
.
Definition at line 129 of file iterhash.h.
IteratedHash< T_HashWordType, T_Endianness, T_BlockSize, T_Base >::CRYPTOPP_COMPILE_ASSERT | ( | (T_BlockSize &(T_BlockSize-1)) | = =0 | ) |
|
inlineprotectedvirtual |
Implements IteratedHashBase< T_HashWordType, T_Base >.
Definition at line 135 of file iterhash.h.
|
inlinevirtual |
Provides the byte order of the hash.
GetByteOrder() returns T_Endianness::ToEnum()
.
Implements IteratedHashBase< T_HashWordType, T_Base >.
Definition at line 122 of file iterhash.h.
|
protected |
Definition at line 136 of file iterhash.h.