Panda3D
|
Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ () | |
__init__ (const HashVal copy) | |
VectorUchar | asBin () |
Returns the HashVal as a 16-byte binary string. | |
str | asDec () |
Returns the HashVal as a string with four decimal numbers. | |
str | asHex () |
Returns the HashVal as a 32-byte hexadecimal string. | |
int | compareTo (const HashVal other) |
hashBuffer (str buffer, int length) | |
Generates the hash value by hashing the indicated data. | |
hashBytes (VectorUchar data) | |
Generates the hash value by hashing the indicated data. | |
bool | hashFile (const Filename filename) |
Generates the hash value from the indicated file. | |
hashRamfile (const Ramfile ramfile) | |
Generates the hash value by hashing the indicated data. | |
bool | hashStream (Istream stream) |
Generates the hash value from the indicated file. | |
hashString (str data) | |
Generates the hash value by hashing the indicated data. | |
inputBinary (Istream in) | |
Inputs the HashVal as a binary stream of bytes in order. | |
inputDec (Istream in) | |
Inputs the HashVal as four unsigned decimal integers. | |
inputHex (Istream in) | |
Inputs the HashVal as a 32-digit hexadecimal number. | |
mergeWith (const HashVal other) | |
Generates a new HashVal representing the xor of this one and the other one. | |
bool | operator!= (const HashVal other) |
bool | operator< (const HashVal other) |
HashVal | operator= (const HashVal copy) |
bool | operator== (const HashVal other) |
output (Ostream out) | |
outputBinary (Ostream out) | |
Outputs the HashVal as a binary stream of bytes in order. | |
outputDec (Ostream out) | |
Outputs the HashVal as four unsigned decimal integers. | |
outputHex (Ostream out) | |
Outputs the HashVal as a 32-digit hexadecimal number. | |
readDatagram (DatagramIterator source) | |
readStream (StreamReader source) | |
bool | setFromBin (VectorUchar text) |
Sets the HashVal from a 16-byte binary string. | |
bool | setFromDec (str text) |
Sets the HashVal from a string with four decimal numbers. | |
bool | setFromHex (str text) |
Sets the HashVal from a 32-byte hexademical string. | |
writeDatagram (Datagram destination) | |
writeStream (StreamWriter destination) | |
Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer.
__init__ | ( | ) |
__init__ | ( | const HashVal | copy | ) |
VectorUchar asBin | ( | ) |
Returns the HashVal as a 16-byte binary string.
str asDec | ( | ) |
Returns the HashVal as a string with four decimal numbers.
str asHex | ( | ) |
Returns the HashVal as a 32-byte hexadecimal string.
int compareTo | ( | const HashVal | other | ) |
hashBuffer | ( | str | buffer, |
int | length ) |
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.
hashBytes | ( | VectorUchar | data | ) |
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.
bool hashFile | ( | const Filename | filename | ) |
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 | ( | const Ramfile | ramfile | ) |
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.
bool hashStream | ( | Istream | stream | ) |
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.
hashString | ( | str | data | ) |
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 | ( | Istream | in | ) |
Inputs the HashVal as a binary stream of bytes in order.
This is not the same order expected by read_stream().
mergeWith | ( | const HashVal | other | ) |
Generates a new HashVal representing the xor of this one and the other one.
bool operator!= | ( | const HashVal | other | ) |
bool operator< | ( | const HashVal | other | ) |
bool operator== | ( | const HashVal | other | ) |
output | ( | Ostream | out | ) |
outputBinary | ( | Ostream | out | ) |
Outputs the HashVal as a binary stream of bytes in order.
This is not the same order generated by write_stream().
readDatagram | ( | DatagramIterator | source | ) |
readStream | ( | StreamReader | source | ) |
bool setFromBin | ( | VectorUchar | text | ) |
Sets the HashVal from a 16-byte binary string.
Returns true if successful, false otherwise.
bool setFromDec | ( | str | text | ) |
Sets the HashVal from a string with four decimal numbers.
Returns true if valid, false otherwise.
bool setFromHex | ( | str | text | ) |
Sets the HashVal from a 32-byte hexademical string.
Returns true if successful, false otherwise.
writeDatagram | ( | Datagram | destination | ) |
writeStream | ( | StreamWriter | destination | ) |