public byte[] encrypt(byte[] in, byte host) {
		int iterations = 1;
		int modulo = 0;
		if(in.length > 117) {
			iterations = (int)Math.ceil(in.length/117);
			iterations++;
		}
		modulo = in.length % 117;
		byte[] cipherText = new byte[iterations*128];
		PublicKey pubKey = pubKeys.get(host);
		if(pubKey != null) {
			for(int i = 0; i < iterations; i++) {
				byte[] toBeEncrypted;
				if(iterations == i+1) {
					toBeEncrypted = new byte[modulo];
					System.arraycopy(in, (i*117), toBeEncrypted, 0, modulo);
				} else {
					toBeEncrypted = new byte[117];
					System.arraycopy(in, (i*117), toBeEncrypted, 0, 117);
				}
			    try {
			        Cipher rsa;
			        rsa = Cipher.getInstance("RSA/ECB/NoPadding");
			        rsa.init(Cipher.ENCRYPT_MODE, pubKey);
			        byte[] tempCipherText = rsa.doFinal(toBeEncrypted);
			        System.arraycopy(tempCipherText, 0, cipherText, 117*i, 117);//, 128*i, 128);
			    } catch (Exception e) {
			        e.printStackTrace();
			    }
			}
			return cipherText;
		} else {
			System.out.println("Key for host " + host + " not found. Cannot encrypt.");
			return null;
		}
	}