import hashlib


def hash_file(filepath):
    """ hash the file content
    :param filepath: the full path of the file
    :return:the sha1 of the file data
    """
    with open(filepath, 'rb') as f:
        return hashlib.sha1(f.read()).hexdigest()