- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 51 for nextBytes (0.05 sec)
-
src/main/java/jcifs/internal/smb2/Smb2EncryptionContext.java
if (isGCMCipher()) { // SMB 3.1.1 GCM: 96-bit random/fixed + 32-bit counter for guaranteed uniqueness // Fill first 12 bytes with random data secureRandom.nextBytes(nonce); // Last 4 bytes: incrementing counter for guaranteed uniqueness final long counter = this.nonceCounter.incrementAndGet(); final ByteBuffer buffer = ByteBuffer.wrap(nonce, 12, 4);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 35.5K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java
case 3: case 4: case 5: if (clientChallenge == null) { clientChallenge = new byte[8]; RANDOM.nextBytes(clientChallenge); } return getLMv2Response(domain, username, password, challenge, clientChallenge); default: return getPreNTLMResponse(password, challenge); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 26.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/cache2/FileOperatorTest.kt
assertFailsWith<IndexOutOfBoundsException> { operator.write(0, buffer, 4L) } } private fun randomByteString(byteCount: Int): ByteString { val bytes = ByteArray(byteCount) Random(0).nextBytes(bytes) return ByteString.of(*bytes) } private fun snapshot(): ByteString { randomAccessFile!!.getChannel().force(false) val source = file!!.source().buffer() return source.readByteString()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateRequestTest.java
byte[] buffer = invocation.getArgument(0); System.arraycopy(testSalt, 0, buffer, 0, Math.min(buffer.length, testSalt.length)); return null; }).when(mockRandom).nextBytes(any(byte[].class)); } @Test @DisplayName("Should create request with default settings") void testConstructorWithDefaults() { // When
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.7K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/nego/Smb2NegotiateRequest.java
if (config.getMaximumVersion() != null && config.getMaximumVersion().atLeast(DialectVersion.SMB311)) { final byte[] salt = new byte[32]; config.getRandom().nextBytes(salt); negoContexts.add( new PreauthIntegrityNegotiateContext(config, new int[] { PreauthIntegrityNegotiateContext.HASH_ALGO_SHA512 }, salt)); this.preauthSalt = salt;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 9.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java
} public void testAgainstSimplerImplementation() { Random r = new Random(1234567); for (int length = 0; length < 1000; length++) { byte[] bytes = new byte[length]; r.nextBytes(bytes); assertCrc(referenceCrc(bytes), bytes); } } private static int referenceCrc(byte[] bytes) { int crc = ~0; for (byte b : bytes) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 6.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java
@BeforeEach void setUp() { MockitoAnnotations.openMocks(this); when(mockContext.getConfig()).thenReturn(mockConfig); testFileId = new byte[16]; new SecureRandom().nextBytes(testFileId); testLocks = new Smb2Lock[] { new Smb2Lock(0L, 100L, Smb2Lock.SMB2_LOCKFLAG_EXCLUSIVE_LOCK) }; request = new Smb2LockRequest(mockConfig, testFileId, testLocks); } @Nested
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 25.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
} public void testString() { Random random = new Random(); for (int i = 0; i < 100; i++) { byte[] bytes = new byte[64]; random.nextBytes(bytes); String s = new String(bytes, UTF_16LE); // so all random strings are valid assertEquals( new Sink(4).putUnencodedChars(s).hash(), new Sink(4).putBytes(s.getBytes(UTF_16LE)).hash());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 8.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/PreauthIntegrityNegotiateContextTest.java
int[] originalHashAlgos = { 0x01, 0x02, 0x03, 0x04, 0x05 }; byte[] originalSalt = new byte[32]; new Random(42).nextBytes(originalSalt); PreauthIntegrityNegotiateContext originalContext = new PreauthIntegrityNegotiateContext(mockConfig, originalHashAlgos, originalSalt);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 34K bytes - Viewed (0) -
src/main/java/jcifs/smb/PreauthIntegrityService.java
* * @return a cryptographically secure random salt */ public byte[] generatePreauthSalt() { byte[] salt = new byte[SALT_SIZE]; secureRandom.nextBytes(salt); log.debug("Generated new preauth salt of {} bytes", salt.length); return salt; } /** * Initializes preauth integrity context for a new session. *
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 12.1K bytes - Viewed (0)