Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for writeUShort (0.19 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. 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)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      ) {
        var payload = ByteString.EMPTY
        if (code != 0 || reason != null) {
          if (code != 0) {
            validateCloseCode(code)
          }
          payload =
            Buffer().run {
              writeShort(code)
              if (reason != null) {
                write(reason)
              }
              readByteString()
            }
        }
    
        try {
          writeControlFrame(OPCODE_CONTROL_CLOSE, payload)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

        }
    
        @Override
        public final void writeByte(final int v) throws SmbException {
            tmp[0] = (byte) v;
            write(tmp, 0, 1);
        }
    
        @Override
        public final void writeShort(final int v) throws SmbException {
            Encdec.enc_uint16be((short) v, tmp, 0);
            write(tmp, 0, 2);
        }
    
        @Override
        public final void writeChar(final int v) throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.1K bytes
    - Viewed (0)
Back to top