in sparkey/__init__.py [0:0]
def writehash(hashfile, logfile, hash_size=0):
"""Write a hash file based on the contents in the log file.
If the log file hasn't been changed since the existing hashfile
was created, this is a no-op.
@param hashfile: file to create. If it already exists, it will
atomically be updated.
@param logfile: file to read from. It must exist.
@param hash_size: Valid values are 0, 4, 8. 0 means autoselect
hash size. 4 is 32 bit hash, 8 is 64 bit hash.
"""
hashfile = _to_bytes(hashfile, "hashfile")
logfile = _to_bytes(logfile, "logfile")
_hash_write(hashfile, logfile, hash_size)