hash bytes_to_hash(data, hash_algorithm='sha256') Source code in griptape/utils/hash.py 4 5 6 7 8 9def bytes_to_hash(data: bytes, hash_algorithm: str = "sha256") -> str: m = hashlib.new(hash_algorithm) m.update(data) return m.hexdigest() str_to_hash(text, hash_algorithm='sha256') Source code in griptape/utils/hash.py 12 13 14 15 16 17def str_to_hash(text: str, hash_algorithm: str = "sha256") -> str: m = hashlib.new(hash_algorithm) m.update(text.encode()) return m.hexdigest()