Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 36 for SecureRandom (0.04 sec)

  1. src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java

        private CIFSContext mockContext;
        private SecureRandom mockRandom;
        private Smb2NegotiateRequest request;
        private byte[] testMachineId = new byte[16];
        private byte[] testSalt = new byte[32];
    
        @BeforeEach
        void setUp() {
            mockConfig = mock(Configuration.class);
            mockContext = mock(CIFSContext.class);
            mockRandom = mock(SecureRandom.class);
    
            // Initialize test data
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  2. src/test/java/jcifs/ntlmssp/Type3MessageTest.java

            Configuration mockConfig = mock(Configuration.class);
            NameServiceClient mockNameServiceClient = mock(NameServiceClient.class);
            NetbiosAddress mockHost = mock(NetbiosAddress.class);
            SecureRandom mockRandom = mock(SecureRandom.class);
    
            // Create a machine ID (32 bytes)
            byte[] machineId = new byte[32];
            mockRandom.nextBytes(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)
  3. src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java

        @BeforeEach
        void setUp() {
            // Initialize test keys
            testEncryptionKey = new byte[16]; // 128-bit key
            testDecryptionKey = new byte[16]; // 128-bit key
            new SecureRandom().nextBytes(testEncryptionKey);
            new SecureRandom().nextBytes(testDecryptionKey);
    
            // Create encryption context with required parameters
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 44.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/util/SecureKeyManagerTest.java

            String sessionId1 = "session-1";
            String sessionId2 = "session-2";
    
            byte[] key1 = new byte[16];
            byte[] key2 = new byte[16];
            new SecureRandom().nextBytes(key1);
            new SecureRandom().nextBytes(key2);
    
            keyManager.storeSessionKey(sessionId1, key1, "AES");
            keyManager.storeSessionKey(sessionId2, key2, "AES");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb2/lease/Smb2LeaseKey.java

     */
    package jcifs.internal.smb2.lease;
    
    import java.security.SecureRandom;
    import java.util.Arrays;
    
    /**
     * SMB2 Lease Key
     *
     * Represents a 16-byte lease key used to identify leases in SMB2/SMB3
     * MS-SMB2 2.2.13.2.8
     */
    public class Smb2LeaseKey {
    
        private final byte[] key;
        private static final SecureRandom RANDOM = new SecureRandom();
        private static final int LEASE_KEY_SIZE = 16;
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 00:16:17 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/Smb2TransformHeaderTest.java

    import static org.junit.jupiter.api.Assertions.assertNotNull;
    import static org.junit.jupiter.api.Assertions.assertThrows;
    import static org.junit.jupiter.api.Assertions.assertTrue;
    
    import java.security.SecureRandom;
    
    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.DisplayName;
    import org.junit.jupiter.api.Test;
    import org.junit.jupiter.params.ParameterizedTest;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  7. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.InputStream;
    import java.security.GeneralSecurityException;
    import java.security.KeyStore;
    import java.security.SecureRandom;
    import javax.net.ssl.KeyManagerFactory;
    import javax.net.ssl.SSLContext;
    import javax.net.ssl.TrustManagerFactory;
    import okhttp3.mockwebserver.Dispatcher;
    import okhttp3.mockwebserver.MockResponse;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jan 02 02:50:44 UTC 2019
    - 4.7K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/nego/NegotiateContextRequestTest.java

            void testDataIntegrity() throws SMBProtocolDecodingException {
                // Create complex test data
                int[] hashAlgos = new int[20];
                byte[] salt = new byte[64];
                SecureRandom random = new SecureRandom();
    
                for (int i = 0; i < hashAlgos.length; i++) {
                    hashAlgos[i] = random.nextInt(65536);
                }
                random.nextBytes(salt);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/config/DelegatingConfigurationTest.java

        @Test
        @DisplayName("Random access should delegate to underlying configuration")
        void testRandomDelegation() {
            // Given
            SecureRandom expectedRandom = new SecureRandom();
            when(mockDelegate.getRandom()).thenReturn(expectedRandom);
    
            // When
            SecureRandom result = delegatingConfig.getRandom();
    
            // Then
            assertSame(expectedRandom, result, "Should return delegated random");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  10. src/main/java/jcifs/util/SecureKeyManager.java

        private final Map<String, SecretKey> sessionKeys = new ConcurrentHashMap<>();
        private final Map<String, byte[]> rawKeys = new ConcurrentHashMap<>();
        private final SecureRandom secureRandom = new SecureRandom();
        private KeyStore keyStore;
        private char[] keyStorePassword;
        private volatile boolean closed = false;
    
        /**
         * Create a secure key manager without KeyStore
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 21.5K bytes
    - Viewed (0)
Back to top