Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 34 for writeULong (0.26 seconds)

  1. src/main/java/jcifs/smb1/ntlmssp/NtlmMessage.java

            final int offset = readULong(src, index + 4);
            final byte[] buffer = new byte[length];
            System.arraycopy(src, offset, buffer, 0, length);
            return buffer;
        }
    
        static void writeULong(final byte[] dest, final int offset, final int ulong) {
            dest[offset] = (byte) (ulong & 0xff);
            dest[offset + 1] = (byte) (ulong >> 8 & 0xff);
            dest[offset + 2] = (byte) (ulong >> 16 & 0xff);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  2. src/main/java/jcifs/smb1/ntlmssp/Type1Message.java

                }
                final byte[] type1 = new byte[hostInfo ? 32 + domain.length + workstation.length : 16];
                System.arraycopy(NTLMSSP_SIGNATURE, 0, type1, 0, 8);
                writeULong(type1, 8, 1);
                writeULong(type1, 12, flags);
                if (hostInfo) {
                    writeSecurityBuffer(type1, 16, 32, domain);
                    writeSecurityBuffer(type1, 24, 32 + domain.length, workstation);
                }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  3. src/test/java/jcifs/smb1/ntlmssp/NtlmMessageTest.java

        @Test
        @DisplayName("writeULong writes little endian bytes")
        void testWriteULong() {
            byte[] dest = new byte[4];
            NtlmMessage.writeULong(dest, 0, 0x01020304);
            assertArrayEquals(new byte[] { 4, 3, 2, 1 }, dest, "Writer must be little‑endian");
        }
    
        @Test
        @DisplayName("writeULong handles negative values as unsigned")
        void testWriteULongNegative() {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  4. src/main/java/jcifs/ntlmssp/Type2Message.java

            pos += NTLMSSP_SIGNATURE.length;
    
            writeULong(type2, pos, NTLMSSP_TYPE2);
            pos += 4;
    
            // TargetNameFields
            final int targetNameOff = writeSecurityBuffer(type2, pos, targetBytes);
            pos += 8;
    
            writeULong(type2, pos, flags);
            pos += 4;
    
            // ServerChallenge
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 14.4K bytes
    - Click Count (0)
  5. src/main/java/jcifs/ntlmssp/NtlmMessage.java

            final int offset = readULong(src, index + 4);
            final byte[] buffer = new byte[length];
            System.arraycopy(src, offset, buffer, 0, length);
            return buffer;
        }
    
        static void writeULong(final byte[] dest, final int offset, final int ulong) {
            dest[offset] = (byte) (ulong & 0xff);
            dest[offset + 1] = (byte) (ulong >> 8 & 0xff);
            dest[offset + 2] = (byte) (ulong >> 16 & 0xff);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 5.4K bytes
    - Click Count (0)
  6. src/main/java/jcifs/ntlmssp/Type1Message.java

                int pos = 0;
    
                System.arraycopy(NTLMSSP_SIGNATURE, 0, type1, 0, NTLMSSP_SIGNATURE.length);
                pos += NTLMSSP_SIGNATURE.length;
    
                writeULong(type1, pos, NTLMSSP_TYPE1);
                pos += 4;
    
                writeULong(type1, pos, flags);
                pos += 4;
    
                final int domOffOff = writeSecurityBuffer(type1, pos, domain);
                pos += 8;
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 7.8K bytes
    - Click Count (0)
  7. src/test/java/jcifs/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        void testWriteULong() {
            // Test writeULong
            byte[] data = new byte[4];
            ByteBuffer expectedBuffer = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN);
    
            // Test with a positive value
            int value = 0x12345678;
            NtlmMessage.writeULong(data, 0, value);
            expectedBuffer.putInt(0, value);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 12.5K bytes
    - Click Count (0)
  8. src/main/java/jcifs/smb1/ntlmssp/Type2Message.java

                System.arraycopy(NTLMSSP_SIGNATURE, 0, type2, 0, 8);
                writeULong(type2, 8, 2);
                writeSecurityBuffer(type2, 12, data, target);
                writeULong(type2, 20, flags);
                System.arraycopy(challenge != null ? challenge : new byte[8], 0, type2, 24, 8);
                if (context != null) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 13K bytes
    - Click Count (0)
  9. src/main/java/jcifs/smb1/ntlmssp/Type3Message.java

                final byte[] type3 = new byte[64 + domainLength + userLength + workstationLength + lmLength + ntLength + keyLength];
                System.arraycopy(NTLMSSP_SIGNATURE, 0, type3, 0, 8);
                writeULong(type3, 8, 3);
                int offset = 64;
                writeSecurityBuffer(type3, 12, offset, lmResponse);
                offset += lmLength;
                writeSecurityBuffer(type3, 20, offset, ntResponse);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 24.1K bytes
    - Click Count (0)
  10. src/main/java/jcifs/ntlmssp/Type3Message.java

            final byte[] type3 = new byte[size];
            int pos = 0;
    
            System.arraycopy(NTLMSSP_SIGNATURE, 0, type3, 0, 8);
            pos += 8;
    
            writeULong(type3, pos, NTLMSSP_TYPE3);
            pos += 4;
    
            final int lmOff = writeSecurityBuffer(type3, 12, lmResponseBytes);
            pos += 8;
            final int ntOff = writeSecurityBuffer(type3, 20, ntResponseBytes);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 32.7K bytes
    - Click Count (0)
Back to Top