Example #1
0
 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;
 }
Example #2
0
 public void setKey(byte[] nonce) {
   cipher.setKey(nonce);
 }