System.arraycopy(data, 5, challenge, 0, 16); int length = 54 + getUsername().length; byte[] response = new byte[length]; response[0] = EAP_MSCHAPV2_RESPONSE; // OpCode response[3] = (byte) (length & 0xFF); // MS-Length response[4] = 49; // Value-Size System.arraycopy(MSCHAP.doMSCHAPv2(getUsername(), getPassword(), challenge), 2, response, 5, 48); // Response response[53] = 0; // Flags System.arraycopy(getUsername(), 0, response, 54, getUsername().length); // Name return response;
System.arraycopy(data, 5, challenge, 0, 16); int length = 54 + getUsername().length; byte[] response = new byte[length]; response[0] = EAP_MSCHAPV2_RESPONSE; // OpCode response[3] = (byte) (length & 0xFF); // MS-Length response[4] = 49; // Value-Size System.arraycopy(MSCHAP.doMSCHAPv2(getUsername(), getPassword(), challenge), 2, response, 5, 48); // Response response[53] = 0; // Flags System.arraycopy(getUsername(), 0, response, 54, getUsername().length); // Name return response;