Skip to main content
Version: Main branch

hash

superduper.misc.hash

Source code

hash_path​

hash_path(path,
hash_type='md5')
ParameterDescription
pathPath to the file or folder.
hash_typeHashing algorithm to use. Default is md5.

Hash a file or folder.

Only the metadata of the file/folder is hashed, not the content.

Metadata includes:

  • All file names in the folder
  • All file sizes
  • All file modification times

hash_string​

hash_string(string: str)
ParameterDescription
stringstring to hash

Hash a string.

random_sha1​

random_sha1()

Generate random sha1 values.