helperFunctions.hash module

helperFunctions.hash.get_hash(hash_function, binary)

Hashes binary with hash_function.

Parameters:
  • hash_function (str) – The hash function to use. See hashlib for more

  • binary (bytes | str) – The data to hash, either as string or array of Integers

Returns:

The hash as hex string

Return type:

str

helperFunctions.hash.get_md5(code)
Parameters:

code (bytes | str) –

Return type:

str

helperFunctions.hash.get_sha256(code)
Parameters:

code (bytes | str) –

Return type:

str

helperFunctions.hash.get_sha256_for_path(path)
Parameters:

path (Path) –

Return type:

str

helperFunctions.hash.get_tlsh_comparison(first, second)
Parameters:
  • first (str) –

  • second (str) –

Return type:

int