Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for SecureRandom (0.15 sec)

  1. src/test/java/jcifs/smb/PreauthIntegrityServiceTest.java

     */
    public class PreauthIntegrityServiceTest {
    
        private PreauthIntegrityService preauthService;
        private SecureRandom secureRandom;
    
        @BeforeEach
        public void setUp() {
            secureRandom = new SecureRandom();
            preauthService = new PreauthIntegrityService(secureRandom, PreauthIntegrityService.HASH_ALGO_SHA512, true);
        }
    
        @AfterEach
        public void tearDown() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/RequestWithFileIdTest.java

            byte[] shortFileId = new byte[8];
            byte[] standardFileId = new byte[16];
            byte[] longFileId = new byte[32];
    
            new SecureRandom().nextBytes(shortFileId);
            new SecureRandom().nextBytes(standardFileId);
            new SecureRandom().nextBytes(longFileId);
    
            RequestWithFileId request = new Smb2CloseRequest(mockConfig, emptyFileId);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/util/CryptoTest.java

            // Given
            int length = 16;
    
            // When
            byte[] random1 = new byte[length];
            byte[] random2 = new byte[length];
            SecureRandom.getInstanceStrong().nextBytes(random1);
            SecureRandom.getInstanceStrong().nextBytes(random2);
    
            // Then
            assertNotNull(random1);
            assertNotNull(random2);
            assertEquals(length, random1.length);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  4. src/main/java/jcifs/util/SecureCredentialStorage.java

        private static final int GCM_IV_SIZE = 12;
        private static final int SALT_SIZE = 32;
        private static final int PBKDF2_ITERATIONS = 100_000;
    
        private final SecureRandom secureRandom = new SecureRandom();
        private volatile SecretKey masterKey;
        private volatile byte[] salt;
        private volatile boolean destroyed = false;
    
        /**
         * Initialize secure credential storage with a master password
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java

        private final DialectVersion dialect;
        private byte[] encryptionKey;
        private byte[] decryptionKey;
        private final AtomicLong nonceCounter = new AtomicLong(0);
        private final SecureRandom secureRandom = new SecureRandom();
    
        // Secure key management
        private SecureKeyManager keyManager;
        private String sessionId;
        private volatile boolean closed = false;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/PreauthIntegrityService.java

         */
        public PreauthIntegrityService(SecureRandom secureRandom, int hashAlgorithm, boolean enforceIntegrity) {
            this.secureRandom = secureRandom != null ? secureRandom : new SecureRandom();
            this.selectedHashAlgorithm = hashAlgorithm;
            this.enforceIntegrity = enforceIntegrity;
        }
    
        /**
         * Generates a new preauth salt for SMB 3.1.1 negotiation.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/Smb3KeyDerivationTest.java

        void setUp() {
            // Initialize test keys
            sessionKey = new byte[16]; // 128-bit session key
            preauthIntegrity = new byte[64]; // Preauth integrity hash
            new SecureRandom().nextBytes(sessionKey);
            new SecureRandom().nextBytes(preauthIntegrity);
        }
    
        @Test
        @DisplayName("Should derive signing key for SMB 3.0.0 dialect")
        void testDeriveSigningKey_SMB300() {
            // Given
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top