import hashlib


def file_hash(file_path, buff_size):
    """Compute md5 hash for a given file"""
    h = hashlib.md5()  # create a hash object
    with open(file_path, 'rb') as f:  # rb - binary mode
        while True:
            data = f.read(buff_size)
            if not data:
                break
            h.update(data)
    return h.hexdigest()