150151152153154155156157158159160
byte[] packet = message.toByteArray(); byte[] mac = null; // Generate the MAC if (hmac != null) { mac = hmac.generate(sequenceNo, packet, 0, packet.length); } // Perfrom encrpytion if (cipher != null) { packet = cipher.transform(packet);
151152153154155156157158159160161