Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for setRandom (0.05 sec)

  1. src/test/java/jcifs/config/BaseConfigurationTest.java

        void testConstructorWithInitDefaults() throws CIFSException {
            BaseConfiguration configWithDefaults = new BaseConfiguration(true);
    
            assertNotNull(configWithDefaults.getRandom());
            assertNotNull(configWithDefaults.getLocalTimezone());
            assertNotNull(configWithDefaults.getMachineId());
            assertEquals(32, configWithDefaults.getMachineId().length);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 20.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/config/DelegatingConfigurationTest.java

            // Given
            SecureRandom expectedRandom = new SecureRandom();
            when(mockDelegate.getRandom()).thenReturn(expectedRandom);
    
            // When
            SecureRandom result = delegatingConfig.getRandom();
    
            // Then
            assertSame(expectedRandom, result, "Should return delegated random");
            verify(mockDelegate).getRandom();
        }
    
        @Test
        @DisplayName("Protocol version methods should delegate correctly")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/ConfigurationTest.java

        @Mock
        private Configuration mockConfig;
    
        @Test
        @DisplayName("Should define all configuration methods")
        void testConfigurationInterface() {
            assertDoesNotThrow(() -> {
                mockConfig.getRandom();
                mockConfig.getDfsTtl();
                mockConfig.isDfsStrictView();
                mockConfig.isDfsDisabled();
                mockConfig.isDfsConvertToFQDN();
                mockConfig.getMinimumVersion();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  4. src/main/java/jcifs/ntlmssp/Type3Message.java

                } else {
                    // NTLM2 Session Response
    
                    final byte[] clientChallenge = new byte[24];
                    tc.getConfig().getRandom().nextBytes(clientChallenge);
                    java.util.Arrays.fill(clientChallenge, 8, 24, (byte) 0x00);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 32.7K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/NtlmPasswordAuthenticator.java

            case 3:
            case 4:
            case 5:
                // NTLMv2 - secure
                if (this.clientChallenge == null) {
                    this.clientChallenge = new byte[8];
                    tc.getConfig().getRandom().nextBytes(this.clientChallenge);
                }
                return NtlmUtil.getLMv2Response(this.domain, this.username, getPasswordAsCharArray(), chlng, this.clientChallenge);
            default:
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30.3K bytes
    - Viewed (0)
  6. src/main/java/jcifs/config/DelegatingConfiguration.java

            this.delegate = delegate;
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.Configuration#getRandom()
         */
        @Override
        public SecureRandom getRandom() {
            return this.delegate.getRandom();
        }
    
        /**
         * {@inheritDoc}
         *
         * @see jcifs.Configuration#getMinimumVersion()
         */
        @Override
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/ntlmssp/Type3MessageTest.java

            lenient().when(mockConfig.isUseUnicode()).thenReturn(true);
            lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8");
            lenient().when(mockConfig.getRandom()).thenReturn(mockRandom);
            lenient().when(mockConfig.getLanManCompatibility()).thenReturn(3); // Default NTLMv2
            lenient().when(mockConfig.getMachineId()).thenReturn(machineId);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java

            when(mockConfig.getMaximumVersion()).thenReturn(DialectVersion.SMB311);
            when(mockConfig.getMachineId()).thenReturn(testMachineId);
            when(mockConfig.getRandom()).thenReturn(mockRandom);
            when(mockContext.getConfig()).thenReturn(mockConfig);
    
            // Mock random for predictable salt generation
            doAnswer(invocation -> {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb2/nego/Smb2NegotiateRequest.java

            if (config.getMaximumVersion() != null && config.getMaximumVersion().atLeast(DialectVersion.SMB311)) {
                final byte[] salt = new byte[32];
                config.getRandom().nextBytes(salt);
                negoContexts.add(
                        new PreauthIntegrityNegotiateContext(config, new int[] { PreauthIntegrityNegotiateContext.HASH_ALGO_SHA512 }, salt));
                this.preauthSalt = salt;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  10. src/main/java/jcifs/Configuration.java

     *
     */
    public interface Configuration {
    
        /**
         * Gets the secure random number generator for cryptographic operations
         *
         * @return random source to use
         */
        SecureRandom getRandom();
    
        /**
         *
         *
         * Property {@code jcifs.smb.client.dfs.ttl} (int, default 300)
         *
         * @return title to live, in seconds, for DFS cache entries
         */
        long getDfsTtl();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 25.4K bytes
    - Viewed (0)
Back to top