- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 147 for random (0.12 sec)
-
internal/crypto/key_test.go
} } var generateKeyTests = []struct { ExtKey [32]byte Random io.Reader ShouldPass bool }{ {ExtKey: [32]byte{}, Random: nil, ShouldPass: true}, // 0 {ExtKey: [32]byte{}, Random: rand.Reader, ShouldPass: true}, // 1 {ExtKey: [32]byte{}, Random: shortRandom(32), ShouldPass: true}, // 2 {ExtKey: [32]byte{}, Random: shortRandom(31), ShouldPass: false}, // 3 } func TestGenerateKey(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 6.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros } 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(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
private final SpecialRandom random; private final double hitRate; private final int size; private final Set<Element> valuesInSet; private final Element[] queries; CollectionBenchmarkSampleData(int size) { this(true, new SpecialRandom(), 1.0, size); } CollectionBenchmarkSampleData( boolean isUserTypeFast, SpecialRandom random, double hitRate, int size) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
hasher.putChar((char) 0x0201); hasher.assertBytes(new byte[] {1, 2}); } 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 TestHasher().putUnencodedChars(s).hash(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 3.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt
val s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" for (i in s.indices) { assertRoundTrip(s.substring(0, i).encodeUtf8()) } val random = Random(123456789L) val buf = ByteArray(4096) random.nextBytes(buf) assertRoundTrip(buf.toByteString()) } private fun assertRoundTrip(data: ByteString) { val encodeBuffer = Buffer() encode(data, encodeBuffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 04 05:32:07 UTC 2024 - 1.8K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/InternersBenchmark.java
for (int i = 0; i < reps; i++) { String unused = interner.intern(Double.toHexString(Math.random())); } return reps; } @Benchmark int strongInterner(int reps) { Interner<String> interner = Interners.newStrongInterner(); for (int i = 0; i < reps; i++) { String unused = interner.intern(Double.toHexString(Math.random())); } return reps; } @Benchmark int stringIntern(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Mar 04 04:06:35 UTC 2022 - 1.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/RandomAmountInputStream.java
import java.io.IOException; import java.io.InputStream; import java.util.Random; /** Returns a random portion of the requested bytes on each call. */ class RandomAmountInputStream extends FilterInputStream { private final Random random; public RandomAmountInputStream(InputStream in, Random random) { super(checkNotNull(in)); this.random = checkNotNull(random); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.2K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/AccessTokenHelper.java
public class AccessTokenHelper { protected static final String BEARER = "Bearer"; protected Random random = new SecureRandom(); public String generateAccessToken() { return RandomStringUtils.random(ComponentUtil.getFessConfig().getApiAccessTokenLengthAsInteger(), 0, 0, true, true, null, random); } public String getAccessTokenFromRequest(final HttpServletRequest request) {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 2.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java
new StreamingVersion().newHasher(52), new NonStreamingVersion().newHasher(), new NonStreamingVersion().newHasher(123)); Random random = new Random(0); for (int i = 0; i < 200; i++) { RandomHasherAction.pickAtRandom(random).performAction(random, hashers); } HashCode[] codes = new HashCode[hashers.size()]; for (int i = 0; i < hashers.size(); i++) { codes[i] = hashers.get(i).hash();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/graph/GraphMutationTest.java
} @Test public void undirectedGraph() { testGraphMutation(GraphBuilder.undirected()); } private static void testGraphMutation(GraphBuilder<? super Integer> graphBuilder) { Random gen = new Random(42); // Fixed seed so test results are deterministic. for (int trial = 0; trial < NUM_TRIALS; ++trial) { MutableGraph<Integer> graph = graphBuilder.allowsSelfLoops(true).build();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 18 16:17:46 UTC 2017 - 4.2K bytes - Viewed (0)