Home
last modified time | relevance | path

Searched refs:random (Results 1 – 25 of 71) sorted by relevance

123

/libcore/luni/src/test/java/tests/security/interfaces/
DDSAKeyPairGeneratorTest.java49 SecureRandom random = null; in test_DSAKeyPairGenerator01() local
52 random = SecureRandom.getInstance("SHA1PRNG"); in test_DSAKeyPairGenerator01()
58 dsa.initialize(dsaParams, random); in test_DSAKeyPairGenerator01()
72 dsa.initialize(null, random); in test_DSAKeyPairGenerator01()
88 SecureRandom random = null; in test_DSAKeyPairGenerator02() local
91 random = SecureRandom.getInstance("SHA1PRNG"); in test_DSAKeyPairGenerator02()
98 dsa.initialize(520, false, random); in test_DSAKeyPairGenerator02()
112 dsa.initialize(invalidLen[i], true, random); in test_DSAKeyPairGenerator02()
127 dsa.initialize(520, true, random); in test_DSAKeyPairGenerator02()
134 dsa.initialize(520, false, random); in test_DSAKeyPairGenerator02()
/libcore/luni/src/test/java/libcore/javax/crypto/
DMockCipherSpi.java104 protected void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
111 … SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
117 … SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
124 protected void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
131 … SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
137 … SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
144 protected void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
151 … SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
157 … SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { in engineInit() argument
164 protected void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
[all …]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/interfaces/
DDSAKeyPairGeneratorImpl.java46 public void initialize(DSAParams params, SecureRandom random) in initialize() argument
48 if (random == null) { in initialize()
54 secureRandom = random; in initialize()
59 public void initialize(int modlen, boolean genParams, SecureRandom random) in initialize() argument
76 if (random == null) { in initialize()
82 secureRandom = random; in initialize()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DKeyGeneratorSpiTest.java48 protected void engineInit(SecureRandom random) { in engineInit() argument
49 super.engineInit(random); in engineInit()
53 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
55 super.engineInit(params, random); in engineInit()
59 protected void engineInit(int keysize, SecureRandom random) { in engineInit() argument
60 super.engineInit(keysize, random); in engineInit()
DKeyAgreementSpiTest.java71 protected void engineInit(Key key, SecureRandom random) throws InvalidKeyException { in engineInit() argument
72 super.engineInit(key, random); in engineInit()
76 protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
78 super.engineInit(key, params, random); in engineInit()
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DMyKeyPairGenerator1.java62 public void initialize(int keysize, SecureRandom random) { in initialize() argument
66 if (random == null) { in initialize()
70 secureRandom = random; in initialize()
82 public void initialize(AlgorithmParameterSpec param, SecureRandom random) in initialize() argument
84 if (random == null) { in initialize()
91 secureRandom = random; in initialize()
DMyKeyPairGeneratorSpi.java39 public void initialize(int keysize, SecureRandom random) { in initialize() argument
44 if (random == null) { in initialize()
53 public void initialize(AlgorithmParameterSpec params, SecureRandom random) in initialize() argument
55 if (random == null) { in initialize()
DMyAlgorithmParameterGeneratorSpi.java39 public void engineInit(int keysize, SecureRandom random) { in engineInit() argument
46 SecureRandom random) { in engineInit() argument
47 if (random == null) { in engineInit()
DMyKeyPairGenerator2.java56 public void initialize(int keysize, SecureRandom random) { in initialize() argument
61 secureRandom = random; in initialize()
/libcore/ojluni/src/main/java/javax/crypto/
DKeyAgreement.java373 AlgorithmParameterSpec params, SecureRandom random) in implInit() argument
376 spi.engineInit(key, random); in implInit()
378 spi.engineInit(key, params, random); in implInit()
383 AlgorithmParameterSpec params, SecureRandom random) in chooseProvider() argument
389 implInit(spi, initType, key, params, random); in chooseProvider()
404 implInit(spi, initType, key, params, random); in chooseProvider()
493 public final void init(Key key, SecureRandom random) in init() argument
498 spi.engineInit(key, random); in init()
501 chooseProvider(I_NO_PARAMS, key, null, random); in init()
563 SecureRandom random) in init() argument
[all …]
DKeyGenerator.java458 public final void init(SecureRandom random) { in init() argument
460 spi.engineInit(random); in init()
467 mySpi.engineInit(random); in init()
471 initRandom = random; in init()
515 public final void init(AlgorithmParameterSpec params, SecureRandom random) in init() argument
519 spi.engineInit(params, random); in init()
526 mySpi.engineInit(params, random); in init()
530 initRandom = random; in init()
580 public final void init(int keysize, SecureRandom random) { in init() argument
582 spi.engineInit(keysize, random); in init()
[all …]
DKeyGeneratorSpi.java51 protected abstract void engineInit(SecureRandom random); in engineInit() argument
64 SecureRandom random) in engineInit() argument
78 protected abstract void engineInit(int keysize, SecureRandom random); in engineInit() argument
DNullCipherSpi.java69 protected void engineInit(int mode, Key key, SecureRandom random) {} in engineInit() argument
73 SecureRandom random) {} in engineInit() argument
77 SecureRandom random) {} in engineInit() argument
DKeyAgreementSpi.java85 protected abstract void engineInit(Key key, SecureRandom random) in engineInit() argument
105 SecureRandom random) in engineInit() argument
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecureRandom2Test.java49 SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); in testGetProvider() local
50 assertNotNull(random.getProvider()); in testGetProvider()
277 int random = mySecureRandom.getNext(numBits); in test_nextJ() local
278 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
281 random = mySecureRandom.getNext(numBits); in test_nextJ()
282 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
285 random = mySecureRandom.getNext(numBits); in test_nextJ()
286 assertEquals(32, Integer.bitCount(random)); in test_nextJ()
289 random = mySecureRandom.getNext(numBits); in test_nextJ()
290 assertEquals(0, Integer.bitCount(random)); in test_nextJ()
DKeyPairGenerator1Test.java352 SecureRandom random = new SecureRandom(); in testKeyPairGenerator11() local
360 kpg[i].initialize(keys[j], random); in testKeyPairGenerator11()
367 kpg[i].initialize(aps, random); in testKeyPairGenerator11()
387 SecureRandom random = new SecureRandom(); in testKeyPairGenerator12() local
404 mKPG.initialize(keys[i], random); in testKeyPairGenerator12()
416 mKPG.initialize(100, random); in testKeyPairGenerator12()
417 assertEquals("Incorrect random", random, in testKeyPairGenerator12()
422 mKPG.initialize(null, random); in testKeyPairGenerator12()
437 mKPG.initialize(aps, random); in testKeyPairGenerator12()
438 assertEquals("Incorrect random", random, in testKeyPairGenerator12()
[all …]
/libcore/ojluni/src/main/java/java/security/
DKeyPairGenerator.java395 public void initialize(int keysize, SecureRandom random) { in initialize() argument
465 SecureRandom random) in initialize() argument
668 public void initialize(int keysize, SecureRandom random) { in initialize() argument
670 spi.initialize(keysize, random); in initialize()
677 mySpi.initialize(keysize, random); in initialize()
681 initRandom = random; in initialize()
695 SecureRandom random) throws InvalidAlgorithmParameterException { in initialize() argument
697 spi.initialize(params, random); in initialize()
704 mySpi.initialize(params, random); in initialize()
708 initRandom = random; in initialize()
DAlgorithmParameterGenerator.java318 public final void init(int size, SecureRandom random) { in init() argument
319 paramGenSpi.engineInit(size, random); in init()
353 SecureRandom random) in init() argument
355 paramGenSpi.engineInit(genParamSpec, random); in init()
DAlgorithmParameterGeneratorSpi.java64 protected abstract void engineInit(int size, SecureRandom random); in engineInit() argument
77 SecureRandom random) in engineInit() argument
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/support/
DMyKeyGeneratorSpi.java46 protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
54 protected void engineInit(int keysize, SecureRandom random) { in engineInit() argument
61 protected void engineInit(SecureRandom random) { in engineInit() argument
DMyCipher.java83 protected void engineInit(int opmode, Key key, SecureRandom random) in engineInit() argument
89 AlgorithmParameterSpec params, SecureRandom random) in engineInit() argument
95 SecureRandom random) throws InvalidKeyException, in engineInit() argument
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DKeyGeneratorThread.java53 SecureRandom random = new SecureRandom(); in test() local
54 kg.init(random); in test()
58 random = new SecureRandom(); in test()
59 kg.init(random); in test()
/libcore/ojluni/src/main/java/java/security/interfaces/
DDSAKeyPairGenerator.java86 public void initialize(DSAParams params, SecureRandom random) in initialize() argument
115 public void initialize(int modlen, boolean genParams, SecureRandom random) in initialize() argument
/libcore/luni/src/test/java/tests/security/
DSecureRandomTest.java64 private byte[] getRandomBytes(SecureRandom random) { in getRandomBytes() argument
67 random.setSeed(System.currentTimeMillis()+counter); in getRandomBytes()
70 random.nextBytes(randomData); in getRandomBytes()
/libcore/benchmarks/src/benchmarks/regression/
DPriorityQueueBenchmark.java34 private Random random = new Random(189279387L); field in PriorityQueueBenchmark
49 Collections.shuffle(allElements, random); in setUp()
66 Collections.shuffle(seekElements, random); in setUp()

123