- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 49 for nextBytes (0.04 sec)
-
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 Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 6.6K 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 9.3K bytes - Viewed (0) -
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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 35.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
Random rnd = new Random(714958103); for (int trial = 0; trial < 100; trial++) { byte[] left = new byte[1 + rnd.nextInt(32)]; rnd.nextBytes(left); byte[] right = left.clone(); assertThat(comparator1.compare(left, right)).isEqualTo(0); assertThat(comparator2.compare(left, right)).isEqualTo(0); int i = rnd.nextInt(left.length);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 13.5K 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); } @NestedRegistered: Sat Dec 20 13:44:44 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 8.6K 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.7K 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: Sat Dec 20 13:44:44 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: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 12.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketReaderTest.kt
}.also { expected -> assertThat(expected.message!!).contains("closed") } } private fun binaryData(length: Int): ByteString { val junk = ByteArray(length) random.nextBytes(junk) return junk.toByteString() }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 16:11:23 UTC 2025 - 14.4K bytes - Viewed (0)