Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for generateNonce (0.04 sec)

  1. src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java

                    testEncryptionKey, testDecryptionKey);
    
            // When - Generate multiple nonces
            byte[] nonce1 = gcmContext.generateNonce();
            byte[] nonce2 = gcmContext.generateNonce();
            byte[] nonce3 = gcmContext.generateNonce();
    
            // Then - Nonces should be unique (SMB3 compliant: random + counter)
            assertFalse(Arrays.equals(nonce1, nonce2), "Nonces should be different");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 44.1K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java

         * Uses SMB3-compliant nonce generation with guaranteed uniqueness.
         *
         * @return nonce appropriate for the dialect (16 bytes for GCM, 12 bytes for CCM)
         */
        public byte[] generateNonce() {
            final byte[] nonce = new byte[isGCMCipher() ? 16 : 12];
    
            if (isGCMCipher()) {
                // SMB 3.1.1 GCM: 96-bit random/fixed + 32-bit counter for guaranteed uniqueness
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 35.5K bytes
    - Viewed (0)
Back to top