Checksumthing package

Submodules

Checksumthing.hashing module

Checksumthing.hashing.add_hash_to_manitest(manifest_path, hash_path, hash)
Parameters:
  • manifest_path – path to the manifest file
  • hash_path – path to the hash file
  • hash – the hash to be added to the manifest
Checksumthing.hashing.create_decoration(input_string, filepath, args)

Replaces special strings with particular strings

Parameters:
  • input_string – any string
  • filepath – the path of the checksum sidecar file being processed
  • args – User arguments from arg parse
Returns:

Checksumthing.hashing.decorate_hash(pre_hash, hash_value, post_hash, no_space=False)
Checksumthing.hashing.get_hash_length(hash_name)

Provides the length of a given Hash type

Parameters:hash_name – String. name of hash file
Returns:
Checksumthing.hashing.modify_hash(hash_value, args)

Generates a new hash from an existing hash.

Parameters:
  • hash_value – Original hash value to be modified
  • args – User arguments from arg parse
Returns:

Newly generated hash value

Checksumthing.hashing.read_hash(filename, hash_length)

Reads the hash value in a given file

Parameters:
  • filename – path to a file to read hash value
  • hash_length – Length of a file
Returns:

Hash value

Checksumthing.hashing.write_hash(new_hash, filename)

Writes a hash value to a given file

Parameters:
  • new_hash – The hash value
  • filename – File path to the file to write to
Returns: