private byte[] getType3Msg(NTCredentials cre) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream(256);
        byte[] domain = EncodingUtil.getBytes(cre.getDomain(), AUTH_CHARSET);
        byte[] user = EncodingUtil.getBytes(cre.getUserName(), AUTH_CHARSET);
        byte[] work = EncodingUtil.getBytes(cre.getHost(), AUTH_CHARSET);
        //LMX|XvZ
        byte[] lm_resp = null;
        try {
            byte[] lm_nonce = new byte[8];
            rnd.nextBytes(lm_nonce);
            lm_resp =
                    /*
                    Responses.getLMv2Response(cre.getDomain(),
                                              cre.toString(),
                                              cre.getPassword(),
                                              Challenge,
                                              lm_nonce);
             */
            Responses.getLMResponse(cre.getPassword(),Challenge);
        } catch (Exception ex2) {
            ex2.printStackTrace();
            return null;
        }
        //NTLMX|XvZ
        byte[] ntlm_resp = null;
        try {
            byte[] ntlm_nonce = new byte[8];
            rnd.nextBytes(ntlm_nonce);
            ntlm_resp =
                    /*
                    Responses.getNTLMv2Response(cre.getDomain(),
                                                cre.getUserName(),
                                                cre.getPassword(),
                                                TargetInfo,
                                                Challenge,
                                                ntlm_nonce);
                     */
            Responses.getNTLMResponse(cre.getPassword(),Challenge);
        } catch (Exception ex1) {
            ex1.printStackTrace();
            return null;
        }

        final int max_length = 64 + lm_resp.length + ntlm_resp.length +
                               domain.length + work.length + user.length;
        try {
            //len:0
            baos.write(NTLM_HEADER);
            baos.write(TYPE3_HEADER);
            //len:12
            //LMX|X̒()
            byte lm_len[] = convertShort(lm_resp.length);
            baos.write(lm_len);
            baos.write(lm_len);
            //LMX|X̃ItZbg
            baos.write(convertShort
                       (max_length - lm_resp.length - ntlm_resp.length));
            baos.write(0);
            baos.write(0);
            //len:20

            //NTLMX|X̒
            byte[] ntlm_len = convertShort(ntlm_resp.length);
            baos.write(ntlm_len);
            baos.write(ntlm_len);
            //NTLMX|XItZbg
            baos.write(convertShort(max_length - ntlm_resp.length));
            baos.write(0);
            baos.write(0);
            //len:28

            //hC
            byte[] dm_len = convertShort(domain.length);
            baos.write(dm_len);
            baos.write(dm_len);
            //hCItZbg
            baos.write(convertShort(64));
            baos.write(0);
            baos.write(0);
            //len:36

            //[U
            byte[] us_len = convertShort(user.length);
            baos.write(us_len);
            baos.write(us_len);
            //[UItZbg
            baos.write(convertShort(64 + domain.length));
            baos.write(0);
            baos.write(0);
            //len:44

            //[NXe[V
            byte[] wk_len = convertShort(work.length);
            baos.write(wk_len);
            baos.write(wk_len);
            //[UItZbg
            baos.write(convertShort(64 + domain.length + user.length));
            baos.write(0);
            baos.write(0);
            //len:52
            //ZbV
            baos.write(0);
            baos.write(0);
            //
            baos.write(0);
            baos.write(0);
            //ZbV@ItZbgFŌ(Ȃ)
            baos.write(convertShort(max_length));
            baos.write(0);
            baos.write(0);
            //len:60
            ///tO
            Util.writeInteger(baos, 0x00000201);
            //len:64

            //hC@f[^
            baos.write(domain);
            //[U@f[^
            baos.write(user);
            //[NXe[V@f[^
            baos.write(work);
            //LMX|X
            baos.write(lm_resp);
            //NTLMX|X
            baos.write(ntlm_resp);
            //ꉞ
            baos.flush();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        return baos.toByteArray();
    }