Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for nextBytes (0.05 sec)

  1. 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);
    
            // All sizes should be accepted without exception
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/Hashing.java

        for (HashCode hashCode : hashCodes) {
          byte[] nextBytes = hashCode.asBytes();
          checkArgument(
              nextBytes.length == resultBytes.length, "All hashcodes must have the same bit length.");
          for (int i = 0; i < nextBytes.length; i++) {
            resultBytes[i] = (byte) (resultBytes[i] * 37 ^ nextBytes[i]);
          }
        }
        return HashCode.fromBytesNoCopy(resultBytes);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 29.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/Smb3KeyDerivationTest.java

            // 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)
  4. src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java

        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
            encryptionContext = new Smb2EncryptionContext(1, DialectVersion.SMB311, testEncryptionKey, testDecryptionKey);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 44.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/hash/Hashing.java

        for (HashCode hashCode : hashCodes) {
          byte[] nextBytes = hashCode.asBytes();
          checkArgument(
              nextBytes.length == resultBytes.length, "All hashcodes must have the same bit length.");
          for (int i = 0; i < nextBytes.length; i++) {
            resultBytes[i] = (byte) (resultBytes[i] * 37 ^ nextBytes[i]);
          }
        }
        return HashCode.fromBytesNoCopy(resultBytes);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 22:06:57 UTC 2025
    - 31.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/util/SecureKeyManagerTest.java

            String sessionId1 = "session-1";
            String sessionId2 = "session-2";
    
            byte[] key1 = new byte[16];
            byte[] key2 = new byte[16];
            new SecureRandom().nextBytes(key1);
            new SecureRandom().nextBytes(key2);
    
            keyManager.storeSessionKey(sessionId1, key1, "AES");
            keyManager.storeSessionKey(sessionId2, key2, "AES");
    
            byte[] retrieved1 = keyManager.getRawKey(sessionId1);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/internal/smb2/io/Smb2WriteRequestTest.java

                byte[] data = new byte[1024];
                new Random().nextBytes(data);
    
                assertDoesNotThrow(() -> request.setData(data, 0, data.length));
            }
    
            @Test
            @DisplayName("Should set data with partial buffer")
            void testSetDataPartialBuffer() {
                byte[] data = new byte[1024];
                new Random().nextBytes(data);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/HashTestUtils.java

            random.nextBytes(value);
            for (PrimitiveSink sink : sinks) {
              sink.putBytes(value);
            }
          }
        },
        PUT_BYTES_INT_INT() {
          @Override
          void performAction(Random random, Iterable<? extends PrimitiveSink> sinks) {
            byte[] value = new byte[random.nextInt(128)];
            random.nextBytes(value);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 25.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/util/SecureCredentialStorage.java

                throw new IllegalArgumentException("Master password cannot be null or empty");
            }
    
            // 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');
        }
    
    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/test/java/jcifs/smb/PreauthIntegrityServiceTest.java

            assertTrue(preauthService.validatePreauthIntegrity(sessionId, expectedHash));
    
            // Validation should fail with incorrect hash
            byte[] incorrectHash = new byte[expectedHash.length];
            secureRandom.nextBytes(incorrectHash);
    
            assertThrows(CIFSException.class, () -> {
                preauthService.validatePreauthIntegrity(sessionId, incorrectHash);
            });
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
Back to top