Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 51 for nextBytes (0.03 sec)

  1. 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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/FilesTest.java

        byte[] bytes = newPreFilledByteArray(1024);
    
        // Setup
        File file = createTempFile();
        Files.write(bytes, file);
    
        Random random = new Random();
        random.nextBytes(expectedBytes);
    
        // Test
        MappedByteBuffer map = Files.map(file, MapMode.READ_WRITE);
        map.put(expectedBytes);
    
        // Verify
        byte[] actualBytes = Files.toByteArray(file);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  3. docs/smb3-features/01-smb3-lease-design.md

        private final byte[] key;  // 16-byte lease key
        private static final SecureRandom random = new SecureRandom();
        
        public Smb2LeaseKey() {
            this.key = new byte[16];
            random.nextBytes(this.key);
        }
        
        public Smb2LeaseKey(byte[] key) {
            if (key.length != 16) {
                throw new IllegalArgumentException("Lease key must be 16 bytes");
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 22K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/primitives/IntsTest.java

        // total overkill, but, it takes 0.1 sec so why not...
        for (int i = 0; i < 10000; i++) {
          int num = r.nextInt();
          assertThat(Ints.fromByteArray(Ints.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          assertThat(Ints.toByteArray(Ints.fromByteArray(b))).isEqualTo(b);
        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Ints.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 29.2K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      private var awaitingPong = false
    
      init {
        require("GET" == originalRequest.method) {
          "Request must be GET: ${originalRequest.method}"
        }
    
        this.key = ByteArray(16).apply { random.nextBytes(this) }.toByteString().base64()
      }
    
      override fun request(): Request = originalRequest
    
      @Synchronized override fun queueSize(): Long = queueSize
    
      override fun cancel() {
        call!!.cancel()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 21.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/FilesTest.java

        byte[] bytes = newPreFilledByteArray(1024);
    
        // Setup
        File file = createTempFile();
        Files.write(bytes, file);
    
        Random random = new Random();
        random.nextBytes(expectedBytes);
    
        // Test
        MappedByteBuffer map = Files.map(file, MapMode.READ_WRITE);
        map.put(expectedBytes);
    
        // Verify
        byte[] actualBytes = Files.toByteArray(file);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  7. src/main/java/jcifs/util/SecureKeyManager.java

         * @return random key bytes
         */
        public byte[] generateRandomKey(int length) {
            checkNotClosed();
    
            byte[] key = new byte[length];
            secureRandom.nextBytes(key);
            return key;
        }
    
        /**
         * Clear all stored keys
         */
        public void clearAllKeys() {
            checkNotClosed();
    
            log.info("Clearing all stored keys");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 21.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/LongsTest.java

        byte[] b = new byte[Longs.BYTES];
    
        for (int i = 0; i < 1000; i++) {
          long num = r.nextLong();
          assertThat(Longs.fromByteArray(Longs.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          long value = Longs.fromByteArray(b);
          assertWithMessage("" + value).that(Arrays.equals(b, Longs.toByteArray(value))).isTrue();
        }
      }
    
      public void testEnsureCapacity() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 28.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/ShortsTest.java

        for (int i = 0; i < 10000; i++) {
          short num = (short) r.nextInt();
          assertThat(Shorts.fromByteArray(Shorts.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          assertThat(Shorts.toByteArray(Shorts.fromByteArray(b))).isEqualTo(b);
        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Shorts.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27.6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/config/BaseConfiguration.java

            this.localTimeZone = TimeZone.getDefault();
            this.random = new SecureRandom();
    
            if (this.machineId == null) {
                final byte[] mid = new byte[32];
                this.random.nextBytes(mid);
                this.machineId = mid;
            }
    
            if (this.nativeOs == null) {
                this.nativeOs = System.getProperty("os.name");
            }
    
            if (this.flags2 == 0) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 36.5K bytes
    - Viewed (0)
Back to top