Skip to content

isimip_utils.checksum

Checksum computation utilities for file integrity verification.

get_checksum(abspath, checksum_type=CHECKSUM_TYPE)

Compute the checksum of a file.

Parameters:

Name Type Description Default
abspath str | Path

Absolute path to the file to checksum.

required
checksum_type str

Type of checksum algorithm to use (default: 'sha512').

CHECKSUM_TYPE

Returns:

Type Description
str

The hexadecimal digest string of the file's checksum.

get_checksum_type()

Get the default checksum type.

Returns:

Type Description
str

The default checksum algorithm name (e.g., 'sha512').

get_checksum_suffix()

Get the file suffix for checksum files.

Returns:

Type Description
str

The checksum file extension (e.g., '.sha512').