public static CryptoKey getCryptoKey(String firmwareName, String firmwarePath)
			throws CryptoException {

		loadIfNeeded();

		Map<String, CryptoKey> firmwareMap = cryptoMap.get(firmwareName);
		if (firmwareMap == null) {
			throw new CryptoException(
				"Firmware may be encrypted, but XML key file does not exist: " + "[" +
					firmwareName + ".xml]");
		}

		CryptoKey cryptoKey = firmwareMap.get(firmwarePath);//check for absolute path

		if (cryptoKey == null) {//check for relative path
			File file = new File(firmwarePath);
			cryptoKey = firmwareMap.get(file.getName());
		}
		if (cryptoKey == null) {//okay it does not exist
			throw new CryptoException("[" + firmwareName + ".xml]" +
				" does not contain an entry for " + firmwarePath + ".  File might be encrypted.");
		}
		if (cryptoKey == CryptoKey.NOT_ENCRYPTED_KEY) {
			return cryptoKey;
		}
		if (cryptoKey.isEmpty()) {
			throw new CryptoException(
				"No key specified in [" + firmwareName + ".xml] file for [" + firmwarePath + "]");
		}
		return cryptoKey;
	}
Loads the crypto key XML file if it is not currently loaded OR if it has
changed since it was last loaded.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/crypto/CryptoKeyFactory.java