Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for encryptCredentials (0.27 sec)

  1. src/test/java/jcifs/util/SecureCredentialStorageTest.java

            char[] plaintext = "SamePassword".toCharArray();
    
            // Encrypt twice
            byte[] encrypted1 = storage.encryptCredentials(plaintext.clone());
            byte[] encrypted2 = storage.encryptCredentials(plaintext.clone());
    
            // Should produce different ciphertexts due to random IV
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/SecureCredentialStorage.java

            this.masterKey = deriveKey(masterPassword, this.salt);
    
            // Clear the master password after use
            Arrays.fill(masterPassword, '\0');
        }
    
        public byte[] encryptCredentials(char[] plaintext) throws GeneralSecurityException {
            checkNotDestroyed();
    
            if (plaintext == null) {
                return null;
            }
    
            // Convert char[] to byte[] for encryption
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 12.7K bytes
    - Viewed (0)
Back to top