Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for deriveKey (0.2 sec)

  1. src/main/java/jcifs/smb/NtlmContext.java

            this.signKey = deriveKey(mk, C2S_SIGN_CONSTANT);
            this.verifyKey = deriveKey(mk, S2C_SIGN_CONSTANT);
    
            if (log.isDebugEnabled()) {
                log.debug("Sign key is " + Hexdump.toHexString(this.signKey));
                log.debug("Verify key is " + Hexdump.toHexString(this.verifyKey));
            }
    
            this.sealClientKey = deriveKey(mk, C2S_SEAL_CONSTANT);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 17.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/util/SecureKeyManagerTest.java

            byte[] baseKey = new byte[16];
            new SecureRandom().nextBytes(baseKey);
    
            byte[] derived1 = keyManager.deriveKey(baseKey, "label1", null, 32);
            byte[] derived2 = keyManager.deriveKey(baseKey, "label2", null, 32);
            byte[] derived3 = keyManager.deriveKey(baseKey, "label1", new byte[] { 1, 2, 3 }, 32);
    
            assertEquals(32, derived1.length, "Derived key should have correct length");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  3. src/main/java/jcifs/util/SecureCredentialStorage.java

            }
    
            // Generate salt for key derivation
            this.salt = new byte[SALT_SIZE];
            secureRandom.nextBytes(this.salt);
    
            // Derive master key from password
            this.masterKey = deriveKey(masterPassword, salt);
    
            // Clear the master password after use
            Arrays.fill(masterPassword, '\0');
        }
    
        /**
         * Initialize secure credential storage with existing salt and 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)
  4. src/main/java/jcifs/util/SecureKeyManager.java

         * @param context key derivation context
         * @param length desired key length in bytes
         * @return derived key
         * @throws GeneralSecurityException if key derivation fails
         */
        public byte[] deriveKey(byte[] baseKey, String label, byte[] context, int length) throws GeneralSecurityException {
            checkNotClosed();
    
            // Simple KDF implementation (should be replaced with proper KDF like HKDF)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 21.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/pac/PacMacTest.java

            byte[] constant = "constant".getBytes();
            byte[] derivedKey = PacMac.deriveKeyAES(key, constant);
            assertNotNull(derivedKey);
            assertEquals(16, derivedKey.length);
    
            // Test with a different key size
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/Smb2SigningDigestTest.java

                    byte[] derivedKey = new byte[16];
                    Arrays.fill(derivedKey, (byte) 0xCC);
                    mockedKeyDerivation.when(
                            () -> Smb3KeyDerivation.deriveSigningKey(eq(Smb2Constants.SMB2_DIALECT_0300), any(byte[].class), any(byte[].class)))
                            .thenReturn(derivedKey);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 43.7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/Smb3KeyDerivationTest.java

                new SecureRandom().nextBytes(testKey);
    
                // When
                byte[] derivedKey = Smb3KeyDerivation.deriveSigningKey(dialect, testKey, preauthIntegrity);
    
                // Then
                assertNotNull(derivedKey, "Should handle " + size + "-byte session key");
                assertEquals(16, derivedKey.length, "Should always produce 16-byte key regardless of input size");
            }
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.5K bytes
    - Viewed (0)
Back to top