public void write() throws IOException {
		if (!ipswZipFile.getName().endsWith(".ipsw")) {
			throw new IOException("File is not an IPSW.");
		}

		File ipswFile = new File(ipswZipFile.getName());

		File xmlFile =
			new File(CryptoKeyFactory.getCryptoDirectory().getFile(true), ipswFile.getName() +
				".xml");

		PrintWriter writer = new PrintWriter(xmlFile);

		writer.println("<FIRMWARE NAME=\"" + ipswZipFile.getName() + "\">");
		try {
			Enumeration<? extends ZipEntry> entries = ipswZipFile.entries();
			while (entries.hasMoreElements()) {
				ZipEntry entry = entries.nextElement();

				if (entry.isDirectory()) {
					continue;
				}

				writer.println("    <FILE PATH=\"/" + entry.getName() + "\">");
				writer.println("        <KEY></KEY>");
				writer.println("        <IV></IV>");
				writer.println("    </FILE>");
			}
			writer.println("</FIRMWARE>");
		}
		finally {
			writer.close();
		}
	}
Write the XML file.
WARNING: If a file already exists, it will be overwritten.
@throws IOException if an I/O error occurs
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/generic/IpswCryptoKeyFileTemplateWriter.java