private static void writeEncodedValue(int value, ByteArrayOutputStream out) {
		int n = getEncodedLength(value);
		if (n == 1) {
			out.write(value & 0xff);
			return;
		}
		if (n < 1 || n > 0x7f) {
			throw new IllegalArgumentException("bad value: " + n);
		}
		out.write(0x80 | --n);
		int shift = 8 * (n - 1);
		for (int i = 0; i < n; i++) {
			out.write((value >> shift) & 0xff);
			shift -= 8;
		}
	}
Generate private/public SSH RSA keys for test purposes using RSA algorithm.
@return kay pair array suitable for writing to SSH private and public 
key files ([0] corresponds to private key PEM file, [1] corresponds to public key file)
@throws NoSuchAlgorithmException failed to instantiate RSA key pair generator
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/remote/SSHKeyUtil.java