def METHOD_NAME(tfile, args):
    hashes = {}
    for member in tfile.getmembers():
        filename = member.name
        sha1 = hashlib.sha1()
        inobj = tfile.extractfile(member)
        data = inobj.read(4096)
        while data:
            sha1.update(data)
            data = inobj.read(4096)
        digest = sha1.hexdigest()
        hashes[filename] = digest
    return hashes