MHashPP Class Reference

`#include <MHashPP.h>`

## Public Types

enum | Command { endhash }

## Public Member Functions

| MHashPP (void)
| MHashPP (hashid a)
void | init (hashid a)
const std::vector< BYTE > & | end (void)
MHashPP & | operator<< (std::string v)
MHashPP & | operator<< (BitString v)
MHashPP & | operator<< (BYTE v)
MHashPP & | operator<< (Command c)
BitString | getHashBits (void)
const std::vector< BYTE > & | getHashBytes (void)
unsigned int | getHashSize (void)

## Private Member Functions

std::string | getAlgorithmName (void)

## Static Private Member Functions

static std::string | getAlgorithmName (hashid id)

## Private Attributes

bool | hashing
| true iff HashD contains a legal hash descriptor and data can be passed via <<
MHASH | HashD
bool | HashBytesValid
| true iff HashBytes contains a valid hash value
std::vector< BYTE > | HashBytes

## Member Enumeration Documentation

## Command

enum MHashPP::Command

Enumerator
endhash |

## Constructor & Destructor Documentation

## MHashPP() [1/2]

MHashPP::MHashPP | ( | void |  | ) |

## MHashPP() [2/2]

MHashPP::MHashPP | ( | hashid | a | ) |

## Member Function Documentation

## end()

const std::vector< BYTE > & MHashPP::end | ( | void |  | ) |

## getAlgorithmName() [1/2]

std::string MHashPP::getAlgorithmName | ( | hashid | id | ) |

static private

## getAlgorithmName() [2/2]

std::string MHashPP::getAlgorithmName | ( | void |  | ) |

private

## getHashBits()

BitString MHashPP::getHashBits | ( | void |  | ) |

get the hash bits

Returns
  the hash value of the data that has been passed via <<

## getHashBytes()

const std::vector< BYTE > & MHashPP::getHashBytes | ( | void |  | ) |

## getHashSize()

unsigned int MHashPP::getHashSize | ( | void |  | ) |

get the hash size

Returns
  the size of the value returned by getHashBits in bytes

## init()

void MHashPP::init | ( | hashid | a | ) |

## operator<<() [1/4]

MHashPP & MHashPP::operator<< | ( | BitString | v | ) |

feed the BitString v to the hashing algorithm

Parameters

  v | the BitString to be feeded to the hashing algorithm (v.getLength() % 8 == 0 must hold)

## operator<<() [2/4]

MHashPP & MHashPP::operator<< | ( | BYTE | v | ) |

feed the byte v to the hashing algorithm

Parameters

  v | the byte to be feeded to the hashing algorithm

## operator<<() [3/4]

MHashPP & MHashPP::operator<< | ( | MHashPP::Command | c | ) |

interpret the command c

Parameters

  c | a command (member of MHashPP::Command)

## operator<<() [4/4]

MHashPP & MHashPP::operator<< | ( | std::string | v | ) |

feed the std::string v to the hashing algorithm

Parameters

  v | the std::string to be feeded to the hashing algorithm (without '\0' at the end)

## Member Data Documentation

## HashBytes

std::vector<BYTE> MHashPP::HashBytes

private

## HashBytesValid

bool MHashPP::HashBytesValid

private

## HashD

MHASH MHashPP::HashD

private

## hashing

bool MHashPP::hashing

private

The documentation for this class was generated from the following files:

- MHashPP.h
- MHashPP.cc