Home
last modified time | relevance | path

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

/libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/
DSHA1PRNG_SecureRandomImpl.java123 private transient int[] seed; field in SHA1PRNG_SecureRandomImpl
170 seed = new int[HASH_OFFSET + EXTRAFRAME_OFFSET]; in SHA1PRNG_SecureRandomImpl()
171 seed[HASH_OFFSET] = H0; in SHA1PRNG_SecureRandomImpl()
172 seed[HASH_OFFSET + 1] = H1; in SHA1PRNG_SecureRandomImpl()
173 seed[HASH_OFFSET + 2] = H2; in SHA1PRNG_SecureRandomImpl()
174 seed[HASH_OFFSET + 3] = H3; in SHA1PRNG_SecureRandomImpl()
175 seed[HASH_OFFSET + 4] = H4; in SHA1PRNG_SecureRandomImpl()
197 SHA1Impl.updateHash(seed, bytes, 0, bytes.length - 1); in updateSeed()
214 protected synchronized void engineSetSeed(byte[] seed) { in engineSetSeed() argument
216 if (seed == null) { in engineSetSeed()
[all …]
/libcore/luni/src/main/java/java/security/spec/
DEllipticCurve.java39 private final byte[] seed; field in EllipticCurve
59 public EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) { in EllipticCurve() argument
73 if (seed == null) { in EllipticCurve()
74 this.seed = null; in EllipticCurve()
76 this.seed = new byte[seed.length]; in EllipticCurve()
77 System.arraycopy(seed, 0, this.seed, 0, this.seed.length); in EllipticCurve()
152 if (seed == null) { in getSeed()
156 byte[] ret = new byte[seed.length]; in getSeed()
157 System.arraycopy(seed, 0, ret, 0, ret.length); in getSeed()
180 && Arrays.equals(this.seed, otherEc.seed); in equals()
[all …]
/libcore/luni/src/main/java/java/util/
DRandom.java49 private long seed; field in Random
81 public Random(long seed) { in Random() argument
82 setSeed(seed); in Random()
97 seed = (seed * multiplier + 0xbL) & ((1L << 48) - 1); in next()
98 return (int) (seed >>> (48 - bits)); in next()
206 public synchronized void setSeed(long seed) { in setSeed() argument
207 this.seed = (seed ^ multiplier) & ((1L << 48) - 1); in setSeed()
/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/luni/src/test/java/org/apache/harmony/security/tests/provider/crypto/
DSHA1PRNG_SecureRandomTest.java330 byte[] seed = new byte[LENGTH]; in testSetSeedbyteArray02()
335 for (int i = 0; i < seed.length; i++) { in testSetSeedbyteArray02()
336 seed[i] = (byte) i; in testSetSeedbyteArray02()
339 sr.setSeed(seed); in testSetSeedbyteArray02()
340 sr.setSeed(seed); in testSetSeedbyteArray02()
341 sr2.setSeed(seed); in testSetSeedbyteArray02()
364 byte[] seed = new byte[LENGTH]; in testSetSeedbyteArray03()
368 for (int i = 0; i < seed.length; i++) { in testSetSeedbyteArray03()
369 seed[i] = (byte) i; in testSetSeedbyteArray03()
377 sr.setSeed(seed); in testSetSeedbyteArray03()
[all …]
/libcore/luni/src/main/java/java/security/
DSecureRandom.java110 public SecureRandom(byte[] seed) { in SecureRandom() argument
112 setSeed(seed); in SecureRandom()
243 public synchronized void setSeed(byte[] seed) { in setSeed() argument
244 secureRandomSpi.engineSetSeed(seed); in setSeed()
253 public void setSeed(long seed) { in setSeed() argument
254 if (seed == 0) { // skip call from Random in setSeed()
258 Memory.pokeLong(byteSeed, 0, seed, ByteOrder.BIG_ENDIAN); in setSeed()
DSecureRandomSpi.java40 protected abstract void engineSetSeed(byte[] seed); in engineSetSeed() argument
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java32 @Override public synchronized void setSeed(long seed) { state = Long.toString(seed); } in test_subclassing() argument
/libcore/luni/src/main/java/java/util/concurrent/
DThreadLocalRandom.java93 public void setSeed(long seed) { in setSeed() argument
96 rnd = (seed ^ multiplier) & mask; in setSeed()
DForkJoinPool.java650 int seed) { in WorkQueue() argument
654 this.hint = seed; // store initial seed for runWorker in WorkQueue()
1457 int seed; field in ForkJoinPool.Submitter
1458 Submitter(int s) { seed = s; } in Submitter()
1475 (q = ws[m & (r = z.seed) & SQMASK]) != null && r != 0 && in externalPush()
1519 r = z.seed; in fullExternalPush()
1522 z.seed = r ^= (r << 5); in fullExternalPush()
2296 ws[m & z.seed & SQMASK] : null; in commonSubmitterQueue()
2308 (joiner = ws[z.seed & m & SQMASK]) != null && in tryExternalUnpush()
2331 (joiner = ws[(j = z.seed) & m & SQMASK]) != null && task != null) { in externalHelpComplete()
/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/support/src/test/java/org/apache/harmony/security/tests/support/
DRandomImpl.java36 protected void engineSetSeed(byte[] seed) { in engineSetSeed() argument
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DMacTest.java830 byte[] seed = new byte[] { in test_ConsistentBetweenProviders()
852 mac.update(seed); in test_ConsistentBetweenProviders()
/libcore/luni/src/test/java/libcore/java/security/
DProviderTest.java615 protected void engineSetSeed(byte[] seed) { in engineSetSeed() argument