HashVal
from panda3d.core import HashVal
- class HashVal
Bases:
Stores a 128-bit value that represents the hashed contents (typically MD5) of a file or buffer.
Inheritance diagram
- __init__()
- __init__(copy: HashVal)
- hash_file(filename: Filename) bool
Generates the hash value from the indicated file. Returns true on success, false if the file cannot be read.
- hash_stream(stream: istream) bool
Generates the hash value from the indicated file. Returns true on success, false if the file cannot be read.
- input_binary(in: istream)
Inputs the
HashValas a binary stream of bytes in order. This is not the same order expected byread_stream().
- merge_with(other: HashVal)
Generates a new
HashValrepresenting the xor of this one and the other one.
- output_binary(out: ostream)
Outputs the
HashValas a binary stream of bytes in order. This is not the same order generated bywrite_stream().
- read_datagram(source: DatagramIterator)
- read_stream(source: StreamReader)
- set_from_bin(text: bytes) bool
Sets the
HashValfrom a 16-byte binary string. Returns true if successful, false otherwise.
- set_from_dec(text: str) bool
Sets the
HashValfrom a string with four decimal numbers. Returns true if valid, false otherwise.
- set_from_hex(text: str) bool
Sets the
HashValfrom a 32-byte hexademical string. Returns true if successful, false otherwise.
- write_stream(destination: StreamWriter)
