// update authenticator after encoding attributes
authenticator = updateRequestAuthenticator(sharedSecret, packetLength, attributes);
}
DataOutputStream dos = new DataOutputStream(out);
dos.writeByte(getPacketType());
dos.writeByte(getPacketIdentifier());
dos.writeShort(packetLength);
dos.write(getAuthenticator());
dos.write(attributes);
dos.flush();