Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for wiped (0.05 sec)

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

                        if (index == threadCount - 1) {
                            // Last thread wipes password
                            auth.secureWipePassword();
                        } else {
                            // Other threads try to read password
                            String pwd = auth.getPassword();
                            // Password might be null if already wiped
                            assertTrue(pwd == null || pwd.equals("ConcurrentPass123!"));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.3K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/smb2/Smb2SigningDigest.java

            if (this.closed) {
                throw new IllegalStateException("SigningDigest is closed");
            }
            if (this.signingKey == null) {
                throw new IllegalStateException("Signing key has been wiped");
            }
            Mac m;
            if (this.provider != null) {
                m = Mac.getInstance(this.algorithmName, this.provider);
            } else {
                m = Mac.getInstance(this.algorithmName);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java

            // When
            context.secureWipeKeys();
    
            // Then - keys should be wiped (we can't directly access them, but method should complete)
            assertDoesNotThrow(() -> context.secureWipeKeys(), "Should handle multiple wipe calls");
        }
    
        @Test
        @DisplayName("Should detect when key rotation is needed based on bytes encrypted")
    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

                }
            }
            assertTrue(hasNonZero, "Data should have non-zero bytes");
    
            SecureKeyManager.secureWipe(data);
    
            // Verify data is wiped
            for (byte b : data) {
                assertEquals(0, b, "All bytes should be zero after wipe");
            }
        }
    
        @Test
        public void testSecureWipeNull() {
            // Should not throw
            SecureKeyManager.secureWipe(null);
        }
    
    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/util/SecureKeyManager.java

        }
    
        /**
         * Remove and securely wipe a session key
         *
         * @param sessionId unique session identifier
         */
        public void removeSessionKey(String sessionId) {
            checkNotClosed();
    
            // Remove from memory maps
            SecretKey secretKey = sessionKeys.remove(sessionId);
            byte[] rawKey = rawKeys.remove(sessionId);
    
            // Wipe the raw key bytes
            if (rawKey != null) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 21.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java

        /**
         * Close the encryption context and securely wipe keys
         */
        @Override
        public void close() {
            if (closed) {
                return;
            }
    
            try {
                secureWipeKeys();
    
                // Clear session ID
                sessionId = null;
    
                log.debug("Encryption context closed and keys wiped");
            } finally {
                closed = true;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/NtlmPasswordAuthenticator.java

                sessionId = null;
    
                auditLogger.logEvent(EventType.SESSION_DESTROYED, Severity.INFO, "Authenticator closed and credentials wiped",
                        Map.of("username", username != null ? username : "unknown"));
            } finally {
                // Wipe client challenge - guaranteed by try-finally
                if (clientChallenge != null) {
                    SecureKeyManager.secureWipe(clientChallenge);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

                    digest.sign(newData, 0, newData.length, request, response);
                }, "Should throw exception after key is wiped");
            }
    
            @Test
            @DisplayName("Should wipe key on close")
            void testCloseWipesKey() throws Exception {
                byte[] sessionKey = new byte[16];
                Arrays.fill(sessionKey, (byte) 0xBB);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
  9. src/main/java/jcifs/util/SecureCredentialStorage.java

                System.arraycopy(ciphertext, 0, result, GCM_IV_SIZE, ciphertext.length);
    
                return result;
    
            } finally {
                // Securely wipe plaintext bytes - guaranteed by try-finally
                if (plaintextBytes != null) {
                    SecureKeyManager.secureWipe(plaintextBytes);
                }
            }
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/NtlmContext.java

            } else {
                char[] passwordChars = this.auth.getPasswordAsCharArray();
                if (passwordChars != null) {
                    passwordString = new String(passwordChars);
                    // Securely wipe the char array immediately after use
                    java.util.Arrays.fill(passwordChars, '\0');
                }
            }
    
            return new Type3Message(this.transportContext, msg2, this.targetName, passwordString,
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 17.3K bytes
    - Viewed (0)
Back to top