Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for writeUShort (0.61 sec)

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

        }
    
        @Test
        void testWriteUShort() {
            // Test writeUShort
            byte[] data = new byte[2];
            ByteBuffer expectedBuffer = ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN);
    
            // Test with a positive value
            int value = 0x1234;
            NtlmMessage.writeUShort(data, 0, value);
            expectedBuffer.putShort(0, (short) value);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb1/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        @DisplayName("writeUShort writes little endian bytes")
        void testWriteUShort() {
            byte[] dest = new byte[2];
            NtlmMessage.writeUShort(dest, 0, 0xBBAA);
            assertArrayEquals(new byte[] { (byte) 0xAA, (byte) 0xBB }, dest, "Writer must be little‑endian");
        }
    
        @Test
        @DisplayName("writeUShort handles negative values as unsigned")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/ntlmssp/Type2Message.java

            if (domainLength > 0) {
                writeUShort(targetInfo, offset, 2);
                offset += 2;
                writeUShort(targetInfo, offset, domainLength);
                offset += 2;
                System.arraycopy(domain, 0, targetInfo, offset, domainLength);
                offset += domainLength;
            }
            if (serverLength > 0) {
                writeUShort(targetInfo, offset, 1);
                offset += 2;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  4. src/main/java/jcifs/ntlmssp/NtlmMessage.java

            final int length = src != null ? src.length : 0;
            if (length == 0) {
                return offset + 4;
            }
            writeUShort(dest, offset, length);
            writeUShort(dest, offset + 2, length);
            return offset + 4;
        }
    
        static int writeSecurityBufferContent(final byte[] dest, final int pos, final int off, final byte[] src) {
            writeULong(dest, off, pos);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/ntlmssp/NtlmMessage.java

            final int length = src != null ? src.length : 0;
            if (length == 0) {
                return;
            }
            writeUShort(dest, offset, length);
            writeUShort(dest, offset + 2, length);
            writeULong(dest, offset + 4, bodyOffset);
            System.arraycopy(src, 0, dest, bodyOffset, length);
        }
    
        static String getOEMEncoding() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/ntlmssp/Type2Message.java

            if (domainLength > 0) {
                writeUShort(targetInfo, offset, 2);
                offset += 2;
                writeUShort(targetInfo, offset, domainLength);
                offset += 2;
                System.arraycopy(domain, 0, targetInfo, offset, domainLength);
                offset += domainLength;
            }
            if (serverLength > 0) {
                writeUShort(targetInfo, offset, 1);
                offset += 2;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 13K bytes
    - Viewed (0)
  7. src/test/java/jcifs/ntlmssp/Type2MessageTest.java

                Type2Message.writeULong(truncatedMessage, 8, Type2Message.NTLMSSP_TYPE2);
                // Set empty target name buffer
                Type2Message.writeUShort(truncatedMessage, 12, 0); // length
                Type2Message.writeUShort(truncatedMessage, 14, 0); // max length
                Type2Message.writeULong(truncatedMessage, 16, 48); // offset (past the end)
                // Set flags
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 38.9K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

      fun encodeQuery(
        host: String,
        type: Int,
      ): ByteString =
        Buffer()
          .apply {
            writeShort(0) // query id
            writeShort(256) // flags with recursion
            writeShort(1) // question count
            writeShort(0) // answerCount
            writeShort(0) // authorityResourceCount
            writeShort(0) // additional
    
            val nameBuf = Buffer()
            val labels = host.split('.').dropLastWhile { it.isEmpty() }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

      }
    
      /**
       * Writes a {@code short} as specified by {@link DataOutputStream#writeShort(int)}, except using
       * little-endian byte order.
       *
       * @throws IOException if an I/O error occurs
       */
      @Override
      public void writeShort(int v) throws IOException {
        out.write(0xFF & v);
        out.write(0xFF & (v >> 8));
      }
    
      @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb1/smb1/InfoTest.java

        private static void writeLong(byte[] buf, int offset, long val) {
            for (int i = 0; i < 8; i++) {
                buf[offset + i] = (byte) ((val >>> (8 * i)) & 0xFF);
            }
        }
    
        private static void writeShort(byte[] buf, int offset, int val) {
            buf[offset] = (byte) (val & 0xFF);
            buf[offset + 1] = (byte) ((val >>> 8) & 0xFF);
        }
    
        @Test
        void testTrans2QueryPathBasicInfoParsing() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
Back to top