Home
last modified time | relevance | path

Searched refs:seed (Results 1 – 22 of 22) sorted by relevance

/libcore/ojluni/src/test/java/time/jdk/testlibrary/
DRandomFactory.java41 Long seed = null; in getSystemSeed() local
46 seed = Long.valueOf(System.getProperty("seed")); in getSystemSeed()
51 return seed; in getSystemSeed()
72 Long seed = getSystemSeed(); in getSeed() local
73 if (seed == null) { in getSeed()
74 seed = getRandomSeed(); in getSeed()
76 System.out.println("Seed from RandomFactory = "+seed+"L"); in getSeed()
77 return seed; in getSeed()
/libcore/luni/src/test/java/tests/security/spec/
DEllipticCurveTest.java47 byte[] seed = new byte[24]; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
49 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
56 new EllipticCurve(f1, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
63 seed = null; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
65 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
81 byte[] seed = new byte[24]; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
85 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
93 seed = new byte[24]; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
96 new EllipticCurve(f, a, b, seed); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
104 seed = new byte[24]; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
[all …]
/libcore/ojluni/src/main/java/java/security/spec/
DEllipticCurve.java48 private final byte[] seed; field in EllipticCurve
102 BigInteger b, byte[] seed) { in EllipticCurve() argument
117 if (seed != null) { in EllipticCurve()
118 this.seed = seed.clone(); in EllipticCurve()
120 this.seed = null; in EllipticCurve()
159 if (seed == null) return null; in getSeed()
160 else return seed.clone(); in getSeed()
/libcore/ojluni/src/main/java/java/security/
DSecureRandom.java198 public SecureRandom(byte seed[]) { in SecureRandom() argument
200 getDefaultPRNG(true, seed); in SecureRandom()
203 private void getDefaultPRNG(boolean setSeed, byte[] seed) { in getDefaultPRNG() argument
214 this.secureRandomSpi.engineSetSeed(seed); in getDefaultPRNG()
435 synchronized public void setSeed(byte[] seed) { in setSeed() argument
436 secureRandomSpi.engineSetSeed(seed); in setSeed()
453 public void setSeed(long seed) { in setSeed() argument
460 if (seed != 0) { in setSeed()
461 secureRandomSpi.engineSetSeed(longToByteArray(seed)); in setSeed()
DSecureRandomSpi.java51 protected abstract void engineSetSeed(byte[] seed); in engineSetSeed() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/
DOldSHA1PRNGSecureRandomTest.java326 byte[] seed = new byte[LENGTH]; in testSetSeedbyteArray02()
331 for (int i = 0; i < seed.length; i++) { in testSetSeedbyteArray02()
332 seed[i] = (byte) i; in testSetSeedbyteArray02()
335 sr.setSeed(seed); in testSetSeedbyteArray02()
336 sr.setSeed(seed); in testSetSeedbyteArray02()
337 sr2.setSeed(seed); in testSetSeedbyteArray02()
360 byte[] seed = new byte[LENGTH]; in testSetSeedbyteArray03()
364 for (int i = 0; i < seed.length; i++) { in testSetSeedbyteArray03()
365 seed[i] = (byte) i; in testSetSeedbyteArray03()
373 sr.setSeed(seed); in testSetSeedbyteArray03()
[all …]
/libcore/ojluni/src/main/java/java/util/
DRandom.java86 private final AtomicLong seed; field in Random
135 public Random(long seed) { in Random() argument
137 this.seed = new AtomicLong(initialScramble(seed)); in Random()
140 this.seed = new AtomicLong(); in Random()
141 setSeed(seed); in Random()
145 private static long initialScramble(long seed) { in initialScramble() argument
146 return (seed ^ multiplier) & mask; in initialScramble()
168 synchronized public void setSeed(long seed) { in setSeed() argument
169 this.seed.set(initialScramble(seed)); in setSeed()
200 AtomicLong seed = this.seed; in next() local
[all …]
DSplittableRandom.java172 private long seed; field in SplittableRandom
182 private SplittableRandom(long seed, long gamma) { in SplittableRandom() argument
183 this.seed = seed; in SplittableRandom()
219 return seed += gamma; in nextSeed()
367 public SplittableRandom(long seed) { in SplittableRandom() argument
368 this(seed, GOLDEN_GAMMA); in SplittableRandom()
379 this.seed = mix64(s); in SplittableRandom()
/libcore/benchmarks/src/benchmarks/
DXmlSerializeBenchmark.java34 int seed; field in XmlSerializeBenchmark
40 private void serializeRandomXml(Constructor<? extends XmlSerializer> ctor, long seed) in serializeRandomXml() argument
54 Random r = new Random(seed); in serializeRandomXml()
98 serializeRandomXml(ctor, seed); in internalTimeSerializer()
/libcore/ojluni/annotations/hiddenapi/java/util/
DRandom.java37 public Random(long seed) { in Random() argument
46 private static long initialScramble(long seed) { in initialScramble() argument
50 public synchronized void setSeed(long seed) { in setSeed() argument
185 private final java.util.concurrent.atomic.AtomicLong seed; field in Random
188 seed = null;
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecureRandom2Test.java116 byte[] seed = new SecureRandom().generateSeed(SEED_SIZE); in test_generateSeedI()
117 assertEquals("seed has incorrect size", SEED_SIZE, seed.length); in test_generateSeedI()
177 byte[] seed = SecureRandom.getSeed(SEED_SIZE); in test_getSeedI()
178 assertEquals("seed has incorrect size", SEED_SIZE, seed.length); in test_getSeedI()
DSecureRandomSpiTest.java52 protected void engineSetSeed(byte[] seed) {} in engineSetSeed() argument
/libcore/ojluni/src/test/java/util/concurrent/tck/
DSplittableRandomTest.java121 for (long seed = 2; seed < MAX_LONG_BOUND; seed += 15485863) {
122 SplittableRandom sr1 = new SplittableRandom(seed);
123 SplittableRandom sr2 = new SplittableRandom(seed);
/libcore/ojluni/src/main/java/java/util/stream/
DDoubleStream.java775 public static DoubleStream iterate(final double seed, final DoubleUnaryOperator f) { in iterate() argument
778 double t = seed; in iterate()
DIntStream.java741 public static IntStream iterate(final int seed, final IntUnaryOperator f) { in iterate() argument
744 int t = seed; in iterate()
DLongStream.java734 public static LongStream iterate(final long seed, final LongUnaryOperator f) { in iterate() argument
737 long t = seed; in iterate()
DReduceOps.java69 makeRef(U seed, BiFunction<U, ? super T, U> reducer, BinaryOperator<U> combiner) { in makeRef() argument
75 state = seed; in makeRef()
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java33 @Override public synchronized void setSeed(long seed) { state = Long.toString(seed); } in test_subclassing() argument
/libcore/ojluni/src/main/java/java/util/concurrent/
DThreadLocalRandom.java160 long seed = mix64(seeder.getAndAdd(SEEDER_INCREMENT)); in localInit() local
162 U.putLong(t, SEED, seed); in localInit()
183 public void setSeed(long seed) { in setSeed() argument
/libcore/ojluni/src/main/java/java/lang/
DMath.java792 public static void setRandomSeedInternal(long seed) { in setRandomSeedInternal() argument
793 RandomNumberGeneratorHolder.randomNumberGenerator.setSeed(seed); in setRandomSeedInternal()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DMacTest.java850 byte[] seed = new byte[] { in test_ConsistentBetweenProviders()
879 mac.update(seed); in test_ConsistentBetweenProviders()
/libcore/luni/src/test/java/libcore/java/security/
DProviderTest.java1247 protected void engineSetSeed(byte[] seed) { in engineSetSeed() argument