def compute_hash(file_path): with open(file_path, 'rb') as f: file_contents = f.read() file_hash = hashlib.blake2b(file_contents).hexdigest() return file_hash