import hashlib


def support_hash_file(hash_type, data):
    """Hashes the passed content using sha256 or md5"""
    if hash_type == "sha256":
        return "sha256:%s" % hashlib.sha256(data).hexdigest()
    if hash_type == "md5":
        return "md5:%s" % hashlib.md5(data).hexdigest()