Stuff
public text v1 · immutableSocket socket = new Socket(add, port);
socket.setTcpNoDelay(true);
cipherEn = Cipher.getInstance(SYM_ALGORITHM);
cipherEn.init(Cipher.ENCRYPT_MODE, secretKey);
cout = new CipherOutputStream(out, cipherEn);
public void sendMessage(String message) {
byte[] m = new byte[SIZE];
byte[] temp = message.getBytes();
int last = 0;
for(int i=0; i<message.length()/SIZE; i++) {
for(int j=0; j<SIZE; j++)
m[j] = temp[j+last];
last += SIZE;
cout.write(m);
cout.flush();
}
}