private void ensurePasswords(TaskMonitor monitor) throws IOException {
		// Alert!  Unusual code!
		// Background: contrary to normal expectations, zip container files can have a
		// unique password per-embedded-file.
		// Other archive formats may not have that feature, but the SevenZip jbinding
		// API is designed to allow a per-embedded-file password. 
		// The following loop tests passwords against the file, first trying a
		// common password against all the embedded files (this is the most likely
		// scenario), and then when a password has been found that successfully unlocks
		// the first subset of files, each remaining subsequent encrypted file's name is used to
		// prompt for the next password.
		// If the loop ends without finding a password for an encrypted file,
		// that file will not be readable unless a password is found for it (see 
		// getPasswordForFile()).
		
		try (CryptoSession cryptoSession = fsService.newCryptoSession()) {
			List<ISimpleInArchiveItem> encryptedItems = getEncryptedItemsWithoutPasswords();
			ISimpleInArchiveItem encryptedItem = null;
			while ((encryptedItem = getFirstItemWithoutPassword(encryptedItems)) != null &&
				!monitor.isCancelled()) {
				GFile gFile = fsIndex.getFileByIndex(encryptedItem.getItemIndex());
				if (gFile == null) {
					throw new IOException("Unable to retrieve file " + encryptedItem.getPath());
				}
				getPasswordForFile(gFile, encryptedItem, monitor);
				if (passwords.isEmpty()) {
					// we didn't find any password for any file in the archive.  Abort the loop
					// instead of badgering the user by using other files as prompts
					break;
				}
				encryptedItems.remove(encryptedItem);
			}
			List<ISimpleInArchiveItem> noPasswordFoundList = getEncryptedItemsWithoutPasswords();
			if (!noPasswordFoundList.isEmpty()) {
				Msg.warn(this,
					"Unable to find password for " + noPasswordFoundList.size() + " file(s) in " +
						fsFSRL.getContainer().getName());
			}
		}
	}
Opens the specified sevenzip container file and initializes this file system with the
contents.

@param byteProvider container file 
@param monitor {@link TaskMonitor} to allow the user to monitor and cancel
@throws CancelledException if user cancels
@throws IOException if error when reading data
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/sevenzip/SevenZipFileSystem.java