import hmac
import hashlib


def encrypt_data(key, message):
    """
    Encrypt the given data/message using SHA-256 key.

    Parameters
    ----------
    key : bytes
        secret key.
    message : str
        message that is intended to be hashed.

    Returns
    -------
    str
        the encrypted data
    """
    return hmac.new(key, bytes(message, 'ascii'), digestmod=hashlib.sha256).hexdigest()