def METHOD_NAME(path: str, key: str) -> dict:
    cipherkey = bytes.fromhex(key)
    with open(path, "rb") as f:
        iv = f.read(12)
        tag = f.read(16)
        cipher = Cipher(
            algorithms.AES(cipherkey), modes.GCM(iv, tag), backend=default_backend()
        )
        decryptor = cipher.decryptor()
        data: str = ""
        while True:
            block = f.read(16)
            # data are not authenticated yet
            if block:
                data = data + decryptor.update(block).decode()
            else:
                break
        # throws exception when the tag is wrong
        data = data + decryptor.finalize().decode()
    return json.loads(data)