Panda3D
Public Member Functions | List of all members
HashVal Class Reference

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

Public Member Functions

 __init__ ()
 
 __init__ (const HashVal copy)
 
str asBin ()
 Returns the HashVal as a 16-byte binary string. More...
 
str asDec ()
 Returns the HashVal as a string with four decimal numbers. More...
 
str asHex ()
 Returns the HashVal as a 32-byte hexadecimal string. More...
 
int compareTo (const HashVal other)
 
 inputBinary (Istream in)
 Inputs the HashVal as a binary stream of bytes in order. This is not the same order expected by read_stream(). More...
 
 inputDec (Istream in)
 Inputs the HashVal as four unsigned decimal integers. More...
 
 inputHex (Istream in)
 Inputs the HashVal as a 32-digit hexadecimal number. More...
 
 mergeWith (const HashVal other)
 Generates a new HashVal representing the xor of this one and the other one. More...
 
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. This is not the same order generated by write_stream(). More...
 
 outputDec (Ostream out)
 Outputs the HashVal as four unsigned decimal integers. More...
 
 outputHex (Ostream out)
 Outputs the HashVal as a 32-digit hexadecimal number. More...
 
 readDatagram (DatagramIterator source)
 
 readStream (StreamReader source)
 
bool setFromBin (str text)
 Sets the HashVal from a 16-byte binary string. Returns true if successful, false otherwise. More...
 
bool setFromDec (str text)
 Sets the HashVal from a string with four decimal numbers. Returns true if valid, false otherwise. More...
 
bool setFromHex (str text)
 Sets the HashVal from a 32-byte hexademical string. Returns true if successful, false otherwise. More...
 
 writeDatagram (Datagram destination)
 
 writeStream (StreamWriter destination)
 

Detailed Description

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

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( const HashVal  copy)

◆ asBin()

str asBin ( )

Returns the HashVal as a 16-byte binary string.

◆ asDec()

str asDec ( )

Returns the HashVal as a string with four decimal numbers.

◆ asHex()

str asHex ( )

Returns the HashVal as a 32-byte hexadecimal string.

◆ compareTo()

int compareTo ( const HashVal  other)

◆ inputBinary()

inputBinary ( Istream  in)

Inputs the HashVal as a binary stream of bytes in order. This is not the same order expected by read_stream().

◆ inputDec()

inputDec ( Istream  in)

Inputs the HashVal as four unsigned decimal integers.

◆ inputHex()

inputHex ( Istream  in)

Inputs the HashVal as a 32-digit hexadecimal number.

◆ mergeWith()

mergeWith ( const HashVal  other)

Generates a new HashVal representing the xor of this one and the other one.

◆ operator!=()

bool operator!= ( const HashVal  other)

◆ operator<()

bool operator< ( const HashVal  other)

◆ operator=()

HashVal operator= ( const HashVal  copy)

◆ operator==()

bool operator== ( const HashVal  other)

◆ output()

output ( Ostream  out)

◆ outputBinary()

outputBinary ( Ostream  out)

Outputs the HashVal as a binary stream of bytes in order. This is not the same order generated by write_stream().

◆ outputDec()

outputDec ( Ostream  out)

Outputs the HashVal as four unsigned decimal integers.

◆ outputHex()

outputHex ( Ostream  out)

Outputs the HashVal as a 32-digit hexadecimal number.

◆ readDatagram()

readDatagram ( DatagramIterator  source)

◆ readStream()

readStream ( StreamReader  source)

◆ setFromBin()

bool setFromBin ( str  text)

Sets the HashVal from a 16-byte binary string. Returns true if successful, false otherwise.

◆ setFromDec()

bool setFromDec ( str  text)

Sets the HashVal from a string with four decimal numbers. Returns true if valid, false otherwise.

◆ setFromHex()

bool setFromHex ( str  text)

Sets the HashVal from a 32-byte hexademical string. Returns true if successful, false otherwise.

◆ writeDatagram()

writeDatagram ( Datagram  destination)

◆ writeStream()

writeStream ( StreamWriter  destination)