import hashlib


def hash_zipfile_contents(zf):
    """Returns a hash of a zipfile's file contents.

    Ignores things like file mode, modtime
    """
    h = hashlib.blake2b()
    for name in zf.namelist():
        h.update(name.encode("utf-8"))
        h.update(zf.read(name))
    return h.hexdigest()