protected function getPassphraseFromFile($passphraseFile, $publicKeyFile)
	{
		if (!file_exists($publicKeyFile))
		{
			throw new \RuntimeException('Missing public key file');
		}

		$publicKey = openssl_get_publickey(file_get_contents($publicKeyFile));

		if (!$publicKey)
		{
			throw new \RuntimeException("Failed to load public key.");
		}

		if (!file_exists($passphraseFile))
		{
			throw new \RuntimeException('Missing passphrase file');
		}

		$passphrase = '';

		if (!openssl_public_decrypt(file_get_contents($passphraseFile), $passphrase, $publicKey))
		{
			throw new \RuntimeException('Failed to decrypt passphrase file');
		}

		return $passphrase;
	}