# HashVal

from pandac.PandaModules import HashVal

Class : HashVal
Description : Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer.

## Inheritance:

HashVal:

## Methods of HashVal:

asBin
asDec
asHex
compareTo
hashBuffer
hashFile
hashRamfile
hashString
inputBinary
inputDec
inputHex
mergeWith
operator !=
operator <
operator =
operator ==
output
outputBinary
outputDec
outputHex
readDatagram
readStream
setFromBin
setFromDec
setFromHex
writeDatagram
writeStream

asBin string HashVal::as_bin(void) const; Description: Returns the HashVal as a 16-byte binary string.

asDec string HashVal::as_dec(void) const; Description: Returns the HashVal as a string with four decimal numbers.

asHex string HashVal::as_hex(void) const; Description: Returns the HashVal as a 32-byte hexadecimal string.

compareTo int HashVal::compare_to(HashVal const &other) const; Description:

hashBuffer void HashVal::hash_buffer(char const *buffer, int length); Description: Generates the hash value by hashing the indicated data. This method is only defined if we have the OpenSSL library (which provides md5 functionality) available.

hashFile bool HashVal::hash_file(Filename const &filename); Description: Generates the hash value from the indicated file. Returns true on success, false if the file cannot be read. This method is only defined if we have the OpenSSL library (which provides md5 functionality) available.

hashRamfile void HashVal::hash_ramfile(Ramfile const &ramfile); Description: Generates the hash value by hashing the indicated data. This method is only defined if we have the OpenSSL library (which provides md5 functionality) available.

hashString void HashVal::hash_string(string const &data); Description: Generates the hash value by hashing the indicated data. This method is only defined if we have the OpenSSL library (which provides md5 functionality) available.

inputBinary void HashVal::input_binary(istream &in); Description: Inputs the HashVal as a binary stream of bytes in order. This is not the same order expected by read_stream().

inputDec void HashVal::input_dec(istream &in); Description: Inputs the HashVal as four unsigned decimal integers.

inputHex void HashVal::input_hex(istream &in); Description: Inputs the HashVal as a 32-digit hexadecimal number.

mergeWith void HashVal::merge_with(HashVal const &other); Description: Generates a new HashVal representing the xor of this one and the other one.

operator != bool HashVal::operator !=(HashVal const &other) const; Description:

operator < bool HashVal::operator <(HashVal const &other) const; Description:

operator = void HashVal::operator =(HashVal const &copy); Description:

operator == bool HashVal::operator ==(HashVal const &other) const; Description:

output void HashVal::output(ostream &out) const; Description:

outputBinary void HashVal::output_binary(ostream &out) const; Description: Outputs the HashVal as a binary stream of bytes in order. This is not the same order generated by write_stream().

outputDec void HashVal::output_dec(ostream &out) const; Description: Outputs the HashVal as four unsigned decimal integers.

outputHex void HashVal::output_hex(ostream &out) const; HAVE_OPENSSL Description: Outputs the HashVal as a 32-digit hexadecimal number.

readDatagram void HashVal::read_datagram(DatagramIterator &source); Description:

readStream void HashVal::read_stream(StreamReader &source); Description:

setFromBin bool HashVal::set_from_bin(string const &text); Description: Sets the HashVal from a 16-byte binary string. Returns true if successful, false otherwise.

setFromDec bool HashVal::set_from_dec(string const &text); Description: Sets the HashVal from a string with four decimal numbers. Returns true if valid, false otherwise.

setFromHex bool HashVal::set_from_hex(string const &text); Description: Sets the HashVal from a 32-byte hexademical string. Returns true if successful, false otherwise.

writeDatagram void HashVal::write_datagram(Datagram &destination) const; Description:

writeStream void HashVal::write_stream(StreamWriter &destination) const; Description: