import hashlib

def hash_plugin(path):
    BUF_SIZE = 65536
    hasher = hashlib.sha256()
    with open(path, 'rb') as f:
        while True:
            data = f.read(BUF_SIZE)
            if not data:
                break
            hasher.update(data)
    return hasher.hexdigest()
