import hashlib


def HashFile(filename):
    """Returns SHA-256 hash of a given file."""
    if isinstance(filename, list):
        filename = filename[0]
    try:
        return hashlib.sha256(
            open(filename, "rb").read()).hexdigest()
    except IOError:
        return "UNKNOWN FILE HASH"