Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for getOEMBytes (0.07 sec)

  1. src/test/java/jcifs/util/StringsTest.java

        class OEMEncodingTests {
    
            @Test
            @DisplayName("getOEMBytes should use configuration encoding")
            void testGetOEMBytes() {
                // Given
                Configuration mockConfig = mock(Configuration.class);
                when(mockConfig.getOemEncoding()).thenReturn("UTF-8");
    
                // When
                byte[] result = Strings.getOEMBytes(TEST_STRING, mockConfig);
    
                // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  2. src/main/java/jcifs/netbios/Name.java

        }
    
        int writeWireFormat(final byte[] dst, final int dstIndex) {
            // write 0x20 in first byte
            dst[dstIndex] = 0x20;
    
            final byte tmp[] = Strings.getOEMBytes(this.name, this.config);
            int i;
            for (i = 0; i < tmp.length; i++) {
                dst[dstIndex + 2 * i + 1] = (byte) (((tmp[i] & 0xF0) >> 4) + 0x41);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/util/Strings.java

         *
         * @param str the string to encode
         * @param config the configuration providing the OEM encoding
         * @return the string as bytes
         */
        public static byte[] getOEMBytes(final String str, final Configuration config) {
            if (str == null) {
                return new byte[0];
            }
            try {
                return str.getBytes(config.getOemEncoding());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/NtlmUtil.java

                throws GeneralSecurityException {
            final byte[] p14 = new byte[14];
            final byte[] p21 = new byte[21];
            final byte[] p24 = new byte[24];
            final byte[] passwordBytes = Strings.getOEMBytes(password, tc.getConfig());
            int passwordLength = passwordBytes.length;
    
            // Only encrypt the first 14 bytes of the password for Pre 0.12 NT LM
            if (passwordLength > 14) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java

        }
    
        @Test
        @DisplayName("writeBytesWireFormat with null path returns minimal bytes")
        void testWriteWhenPathIsNull() {
            // When path is null, Strings.getOEMBytes returns empty array, not NPE
            when(mockConfig.getOemEncoding()).thenReturn("windows-1252");
            SmbComQueryInformation nullPathCmd = new SmbComQueryInformation(mockConfig, null);
            byte[] buffer = new byte[50];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/FileBothDirectoryInfoTest.java

                byte[] filenameBytes = Strings.getUNIBytes(filename);
                System.arraycopy(filenameBytes, 0, buffer, 94, filenameBytes.length);
            } else {
                byte[] filenameBytes = Strings.getOEMBytes(filename, mockConfig);
                System.arraycopy(filenameBytes, 0, buffer, 94, filenameBytes.length);
            }
    
            return buffer;
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb1/ServerMessageBlock.java

                dstIndex += str.length() * 2;
                dst[dstIndex] = (byte) '\0';
                dstIndex++;
                dst[dstIndex++] = (byte) '\0';
            } else {
                final byte[] b = Strings.getOEMBytes(str, this.getConfig());
                System.arraycopy(b, 0, dst, dstIndex, b.length);
                dstIndex += b.length;
                dst[dstIndex] = (byte) '\0';
                dstIndex++;
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 38.9K bytes
    - Viewed (0)
Back to top