5_6109662326556721419 Skip to main content
Optim8 Logo

5_6109662326556721419

# Example usage input_str = "Hello, World!" print(create_sha256_hash(input_str))

import hashlib

def create_sha256_hash(input_string): # Create a SHA-256 hash object hash_object = hashlib.sha256() # Convert the string to bytes and update the hash object hash_object.update(input_string.encode('utf-8')) # Get the hexadecimal representation of the hash hash_hex = hash_object.hexdigest() return hash_hex 5_6109662326556721419