Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getOEMBytes (0.31 sec)

  1. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  2. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.1K 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  4. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  5. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  6. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 38.9K bytes
    - Viewed (0)
Back to top