import hashlib


def validateFile(data, hash):

    """
    Validates a file using the MD5 algorithm.
    Returns True if the files MD5 hash signature matches
    the provided hexadecimal string, False otherwise.
    """

    h = hashlib.md5()
    h.update(data)

    return h.hexdigest().lower() == hash.lower()