Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for writeSecurityBuffer (0.11 sec)

  1. src/test/java/jcifs/smb1/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        @DisplayName("writeSecurityBuffer writes zero length buffer unchanged")
        void testWriteSecurityBufferZeroLength() {
            byte[] dest = new byte[10];
            byte[] before = dest.clone();
            NtlmMessage.writeSecurityBuffer(dest, 0, 4, null);
            assertArrayEquals(before, dest, "Zero length should leave dest unchanged");
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        void testWriteSecurityBuffer() {
            // Test writeSecurityBuffer
            byte[] dest = new byte[8]; // Enough for length, max_length, offset
            byte[] src = "Test".getBytes();
    
            // Test with non-null source array
            int nextOffset = NtlmMessage.writeSecurityBuffer(dest, 0, src);
            assertEquals(4, nextOffset, "Should return correct next offset.");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/ntlmssp/Type1Message.java

                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);
                }
                return type1;
            } catch (final IOException ex) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/ntlmssp/Type3Message.java

                int offset = 64;
                writeSecurityBuffer(type3, 12, offset, lmResponse);
                offset += lmLength;
                writeSecurityBuffer(type3, 20, offset, ntResponse);
                offset += ntLength;
                writeSecurityBuffer(type3, 28, offset, domain);
                offset += domainLength;
                writeSecurityBuffer(type3, 36, offset, user);
                offset += userLength;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  5. 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
            final byte[] challengeBytes = getChallenge();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  6. src/main/java/jcifs/ntlmssp/Type3Message.java

            pos += 4;
    
            final int lmOff = writeSecurityBuffer(type3, 12, lmResponseBytes);
            pos += 8;
            final int ntOff = writeSecurityBuffer(type3, 20, ntResponseBytes);
            pos += 8;
            final int domOff = writeSecurityBuffer(type3, 28, domainBytes);
            pos += 8;
            final int userOff = writeSecurityBuffer(type3, 36, userBytes);
            pos += 8;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 32.7K bytes
    - Viewed (0)
  7. src/main/java/jcifs/ntlmssp/Type1Message.java

                pos += 4;
    
                writeULong(type1, pos, flags);
                pos += 4;
    
                final int domOffOff = writeSecurityBuffer(type1, pos, domain);
                pos += 8;
    
                final int wsOffOff = writeSecurityBuffer(type1, pos, workstation);
                pos += 8;
    
                if ((flags & NTLMSSP_NEGOTIATE_VERSION) != 0) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/ntlmssp/NtlmMessage.java

        static void writeUShort(final byte[] dest, final int offset, final int ushort) {
            dest[offset] = (byte) (ushort & 0xff);
            dest[offset + 1] = (byte) (ushort >> 8 & 0xff);
        }
    
        static void writeSecurityBuffer(final byte[] dest, final int offset, final int bodyOffset, final byte[] src) {
            final int length = src != null ? src.length : 0;
            if (length == 0) {
                return;
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  9. 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) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 13K bytes
    - Viewed (0)
  10. src/main/java/jcifs/ntlmssp/NtlmMessage.java

        static void writeUShort(final byte[] dest, final int offset, final int ushort) {
            dest[offset] = (byte) (ushort & 0xff);
            dest[offset + 1] = (byte) (ushort >> 8 & 0xff);
        }
    
        static int writeSecurityBuffer(final byte[] dest, final int offset, final byte[] src) {
            final int length = src != null ? src.length : 0;
            if (length == 0) {
                return offset + 4;
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.4K bytes
    - Viewed (0)
Back to top