deepcave.utils.hash

# Hash

This module provides utilities to convert strings and files to hash.

Functions

file_to_hash(filename)

Convert a file to a hash.

string_to_hash(string)

Convert a string to a hash.

deepcave.utils.hash.file_to_hash(filename)[source]

Convert a file to a hash.

Parameters:

filename (Path) – The path to the file to be converted.

Returns:

The hash object.

Return type:

str

deepcave.utils.hash.string_to_hash(string)[source]

Convert a string to a hash.

Parameters:

string (str) – The string to be converted to hash.

Returns:

The hash object.

Return type:

str