public final Pdu read() throws IOException { Pdu pdu = new Pdu(); pdu.id = readUInt2(); int length = readUInt3(); pdu.version = readUInt2(); pdu.payload = cipher.encrypt(readBytes(length)); return pdu; }
public void setKey(byte[] nonce) { cipher.setKey(nonce); }