private CartV1Decryptor createDecryptor(String proposedArc4Key)
			throws IOException, CartInvalidCartException, CartInvalidARC4KeyException,
			CartConfigurationException, CancelledException {

		// Pad/truncate to the proper length, then test as-is, if it works return the decryptor
		// based on it.
		try {
			byte[] arc4Key =
				Arrays.copyOf(proposedArc4Key.getBytes(), CartV1Constants.ARC4_KEY_LENGTH);
			return createDecryptor(arc4Key);
		}
		catch (CartInvalidARC4KeyException e) {
			// ignore
		}

		// *Very* basic base-64 checks before attempting
		if (proposedArc4Key.length() >= 4 && proposedArc4Key.length() <= 20 &&
			proposedArc4Key.length() % 4 == 0) {
			try {
				byte[] b64key = Base64.getDecoder().decode(proposedArc4Key);

				// If the proposed key is valid base64 encoding, pad/truncate it to the
				// proper length
				if (b64key.length != CartV1Constants.ARC4_KEY_LENGTH) {
					b64key = Arrays.copyOf(b64key, CartV1Constants.ARC4_KEY_LENGTH);
				}

				return createDecryptor(b64key);
			}
			catch (IllegalArgumentException | CartInvalidARC4KeyException e) {
				// ignore
			}
		}

		// If a valid key hasn't been determined, raise the appropriate exception
		throw new CartInvalidARC4KeyException("Private CaRT ARC4 key could not be determined.");
	}
Create the CartV1Decryptor object using the specified key. Tested as-is, and as
base64 decoded.

@param proposedArc4Key The ARC4 key being proposed for this CaRT as a String
@return The CartV1Decryptor object
@throws IOException                 If there is a read failure of the data
@throws CartInvalidCartException    If there was a formating error with the
                                    CaRT file
@throws CartInvalidARC4KeyException If no key could be determined
@throws CartConfigurationException  If the configuration data for CaRT was
                                    found, but invalid.
@throws CancelledException          If the user cancels decryption
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cart/CartV1File.java