HashVal

from acron.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

digraph inheritanced6c448088e { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "HashVal" [URL="acron.core.HashVal.html#acron.core.HashVal",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "HashVal" [arrowsize=0.75,style=""]; }
__eq__()
__init__()
__lt__()
__ne__()
as_bin()

Returns the HashVal as a 16-byte binary string.

as_dec()

Returns the HashVal as a string with four decimal numbers.

as_hex()

Returns the HashVal as a 32-byte hexadecimal string.

assign()
compare_to()
hash_buffer()

Generates the hash value by hashing the indicated data.

hash_bytes()

Generates the hash value by hashing the indicated data.

hash_file()

Generates the hash value from the indicated file. Returns true on success, false if the file cannot be read.

hash_ramfile()

Generates the hash value by hashing the indicated data.

hash_stream()

Generates the hash value from the indicated file. Returns true on success, false if the file cannot be read.

hash_string()

Generates the hash value by hashing the indicated data.

input_binary()

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

input_dec()

Inputs the HashVal as four unsigned decimal integers.

input_hex()

Inputs the HashVal as a 32-digit hexadecimal number.

merge_with()

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

output()
output_binary()

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

output_dec()

Outputs the HashVal as four unsigned decimal integers.

output_hex()

Outputs the HashVal as a 32-digit hexadecimal number.

read_datagram()
read_stream()
set_from_bin()

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

set_from_dec()

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

set_from_hex()

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

write_datagram()
write_stream()