private static BigInteger ElGamalKeySwitch(String line, KeyType type) throws CorruptDataException {
		if (type != null && type == KeyType.PUBLIC) {
			switch (line.charAt(0)) {
			case 'y':
				return new BigInteger(line.substring(2));
			case 'g':
				return new BigInteger(line.substring(2));
			case 'p':
				return new BigInteger(line.substring(2));
			default:
				throw new CorruptDataException("Corrupted file");
			}
		} else if (type != null && type == KeyType.PRIVATE) {
			switch (line.charAt(0)) {
			case 'x':
				return new BigInteger(line.substring(2));
			case 'g':
				return new BigInteger(line.substring(2));
			case 'p':
				return new BigInteger(line.substring(2));
			default:
				throw new CorruptDataException("Corrupted file");
			}
		}
		// Should not happen
		return null;
	}