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
import hashlib
# Example usage input_str = "Hello, World!" print(create_sha256_hash(input_str)) 5_6109662326556721419
Magic the Gathering is TM and copyright Wizards of the Coast, Inc, a subsidiary of Hasbro, Inc. All rights reserved. All art is property of their respective artists and/or Wizards of the Coast. This site is not produced, affiliated or endorsed by Wizards of the Coast, Inc.