import hashlib


def hash_string(string):
    """
    Returns hex and binary SHA-256 hash of given string
    """
    h = hashlib.sha256( string.encode('utf-8') )
    return ( h.hexdigest(), h.digest() )