Examples of copyFromByteArray()


Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

            byte[] content = new byte[data.getEnd() - data.getPosition()];
            data.copyToByteArray(content, 0, data.getPosition(), content.length);
            fragment_buffer = append(fragment_buffer, content);
            if ((flags & CHANNEL_FLAG_LAST) != 0) {
                RdpPackage fullpacket = new RdpPackage(fragment_buffer.length);
                fullpacket.copyFromByteArray(fragment_buffer, 0, 0, fragment_buffer.length);
                // process the entire reconstructed packet
                channel.process(fullpacket);
                fragment_buffer = null;
            }
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        s.copyFromByteArray(client_random, 0, s.getPosition(), Secure.SEC_RANDOM_SIZE);
        s.incrementPosition(Secure.SEC_RANDOM_SIZE);
        s.setLittleEndian16(0);
        s.setLittleEndian16((Secure.SEC_MODULUS_SIZE + Secure.SEC_PADDING_SIZE));
        s.copyFromByteArray(rsa_data, 0, s.getPosition(), Secure.SEC_MODULUS_SIZE);
        s.incrementPosition(Secure.SEC_MODULUS_SIZE);
        s.incrementPosition(Secure.SEC_PADDING_SIZE);

        s.setLittleEndian16(1);
        s.setLittleEndian16(licence_size);
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        s.incrementPosition(Secure.SEC_MODULUS_SIZE);
        s.incrementPosition(Secure.SEC_PADDING_SIZE);

        s.setLittleEndian16(1);
        s.setLittleEndian16(licence_size);
        s.copyFromByteArray(licence_data, 0, s.getPosition(), licence_size);
        s.incrementPosition(licence_size);

        s.setLittleEndian16(1);
        s.setLittleEndian16(LICENCE_HWID_SIZE);
        s.copyFromByteArray(hwid, 0, s.getPosition(), LICENCE_HWID_SIZE);
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        s.copyFromByteArray(licence_data, 0, s.getPosition(), licence_size);
        s.incrementPosition(licence_size);

        s.setLittleEndian16(1);
        s.setLittleEndian16(LICENCE_HWID_SIZE);
        s.copyFromByteArray(hwid, 0, s.getPosition(), LICENCE_HWID_SIZE);
        s.incrementPosition(LICENCE_HWID_SIZE);
        s.copyFromByteArray(signature, 0, s.getPosition(), LICENCE_SIGNATURE_SIZE);
        s.incrementPosition(LICENCE_SIGNATURE_SIZE);

        s.markEnd();
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        s.setLittleEndian16(1);
        s.setLittleEndian16(LICENCE_HWID_SIZE);
        s.copyFromByteArray(hwid, 0, s.getPosition(), LICENCE_HWID_SIZE);
        s.incrementPosition(LICENCE_HWID_SIZE);
        s.copyFromByteArray(signature, 0, s.getPosition(), LICENCE_SIGNATURE_SIZE);
        s.incrementPosition(LICENCE_SIGNATURE_SIZE);

        s.markEnd();
        secure.send(s, sec_flags);
    }
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

            buffer.setLittleEndian32(0x03010000);
        } else {
//            logger.debug("Requesting licence");
            buffer.setLittleEndian32(0xff010000);
        }
        buffer.copyFromByteArray(client_random, 0, buffer.getPosition(), Secure.SEC_RANDOM_SIZE);
        buffer.incrementPosition(Secure.SEC_RANDOM_SIZE);
        buffer.setLittleEndian16(0);

        buffer.setLittleEndian16(Secure.SEC_MODULUS_SIZE + Secure.SEC_PADDING_SIZE);
        buffer.copyFromByteArray(rsa_data, 0, buffer.getPosition(), Secure.SEC_MODULUS_SIZE);
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        buffer.copyFromByteArray(client_random, 0, buffer.getPosition(), Secure.SEC_RANDOM_SIZE);
        buffer.incrementPosition(Secure.SEC_RANDOM_SIZE);
        buffer.setLittleEndian16(0);

        buffer.setLittleEndian16(Secure.SEC_MODULUS_SIZE + Secure.SEC_PADDING_SIZE);
        buffer.copyFromByteArray(rsa_data, 0, buffer.getPosition(), Secure.SEC_MODULUS_SIZE);
        buffer.incrementPosition(Secure.SEC_MODULUS_SIZE);

        buffer.incrementPosition(Secure.SEC_PADDING_SIZE);

        buffer.setLittleEndian16(LICENCE_TAG_USER);
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        buffer.setLittleEndian16(LICENCE_TAG_USER);
        buffer.setLittleEndian16(userlen);

        if (username.length != 0) {
            buffer.copyFromByteArray(username, 0, buffer.getPosition(), userlen - 1);
        } else {
            buffer.copyFromByteArray(username, 0, buffer.getPosition(), userlen);
        }

        buffer.incrementPosition(userlen);
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        buffer.setLittleEndian16(userlen);

        if (username.length != 0) {
            buffer.copyFromByteArray(username, 0, buffer.getPosition(), userlen - 1);
        } else {
            buffer.copyFromByteArray(username, 0, buffer.getPosition(), userlen);
        }

        buffer.incrementPosition(userlen);

        buffer.setLittleEndian16(LICENCE_TAG_HOST);
View Full Code Here

Examples of com.lixia.rdp.Package.RdpPackage.copyFromByteArray()

        buffer.setLittleEndian16(LICENCE_TAG_HOST);
        buffer.setLittleEndian16(hostlen);

        if (hostname.length != 0) {
            buffer.copyFromByteArray(hostname, 0, buffer.getPosition(), hostlen - 1);
        } else {
            buffer.copyFromByteArray(hostname, 0, buffer.getPosition(), hostlen);
        }
        buffer.incrementPosition(hostlen);
        buffer.markEnd();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.