import hmac
import hashlib


def get_hash(key, msg):
    """Generates keyed-hash for a message using HMAC
        Parameters
        ----------
        key: The starting key for the hash.
        msg: message value that will be hashed
     """
    return hmac.new(key, msg.encode('utf-8'), hashlib.sha256).digest()