Searched refs:sr (Results 1 - 25 of 25) sorted by relevance

/libcore/luni/src/test/java/libcore/java/io/
H A DOldStringReaderTest.java27 StringReader sr; field in class:OldStringReaderTest
30 sr = new StringReader(testString);
32 sr.mark(-1);
40 sr = new StringReader(testString);
42 sr.read(buf, 0, -1);
48 sr.read(buf, -1, 1);
54 sr.read(buf, 1, testString.length());
64 sr.close();
/libcore/luni/src/test/java/libcore/java/security/
H A DSecureRandomTest.java74 private void test_SecureRandom(SecureRandom sr) throws Exception { argument
78 sr.nextBytes(out1);
79 sr.nextBytes(out2);
82 byte[] seed1 = sr.generateSeed(20);
83 byte[] seed2 = sr.generateSeed(20);
86 sr.setSeed(STATIC_SEED_BYTES);
87 sr.nextBytes(out1);
88 sr.nextBytes(out2);
91 sr.setSeed(STATIC_SEED_LONG);
92 sr
[all...]
H A DProviderTest.java213 SecureRandom sr = new SecureRandom();
214 if (!sr.getAlgorithm().equals("SecureRandom1")) {
215 throw new IllegalStateException("Expected SecureRandom1 was " + sr.getAlgorithm());
/libcore/luni/src/test/java/tests/java/security/
H A DSecureRandomTest.java62 MySecureRandom sr = new MySecureRandom();
63 if (sr.nextElement(1) != 1 || sr.nextElement(2) != 3 || sr.nextElement(3) != 7) {
72 SecureRandom sr = new SecureRandom();
73 sr.setSeed(12345);
81 SecureRandom sr = new SecureRandom();
82 sr.nextBytes(b);
90 sr.nextBytes(null);
101 SecureRandom sr
[all...]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/provider/crypto/
H A DSHA1PRNG_SecureRandomTest.java42 private static SecureRandom sr; // fields used by tests field in class:SHA1PRNG_SecureRandomTest
51 sr = SecureRandom.getInstance(algorithm, provider);
61 sr.generateSeed(-1);
74 byte[] myBytes = sr.generateSeed(i);
91 myBytes1 = sr.generateSeed(i);
92 myBytes2 = sr.generateSeed(i);
109 sr.nextBytes(null);
133 sr.setSeed(myBytes);
139 sr.nextBytes(myBytes1);
159 sr
[all...]
/libcore/luni/src/test/java/tests/api/java/lang/ref/
H A DSoftReferenceTest.java43 SoftReference sr = new SoftReference(bool, rq);
44 assertTrue("Initialization failed.", ((Boolean) sr.get())
65 SoftReference sr = new SoftReference(bool);
66 assertTrue("Initialization failed.", ((Boolean) sr.get())
78 SoftReference sr = new SoftReference(bool);
79 assertTrue("Same object not returned.", bool == sr.get());
H A DReferenceQueueTest.java51 SoftReference sr = new SoftReference(integer, rq);
52 sr.enqueue();
70 SoftReference sr = new SoftReference(b, rq);
74 sr.enqueue();
98 sr.enqueue();
114 SoftReference sr = new SoftReference(b, rq);
115 sr.enqueue();
125 sr.enqueue();
175 SoftReference sr = new SoftReference(b, rq);
181 sr
[all...]
H A DReferenceTest.java92 SoftReference sr = new SoftReference(tmpA, new ReferenceQueue());
95 assertTrue("Start: Object not cleared.", (sr.get() != null)
98 sr.clear();
101 assertTrue("End: Object cleared.", (sr.get() == null)
105 assertTrue("should always pass", tmpA != sr.get() && tmpB != wr.get());
/libcore/luni/src/test/java/tests/api/org/xml/sax/
H A DInputSourceTest.java73 StringReader sr = new StringReader("Hello, world.");
76 InputSource i = new InputSource(sr);
79 assertEquals(sr, i.getCharacterStream());
145 StringReader sr = new StringReader("Hello, world.");
150 i.setCharacterStream(sr);
153 assertEquals(sr, i.getCharacterStream());
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
H A DCipherPBEThread.java40 SecureRandom sr = new SecureRandom();
49 sr.nextBytes(salt);
H A DCipherSymmetricKeyThread.java38 SecureRandom sr = new SecureRandom();
53 sr.nextBytes(iv);
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/
H A DSSLContextSpiImpl.java22 SecureRandom sr) throws KeyManagementException {
23 if (sr == null) {
21 engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) argument
H A DMySSLContextSpi.java44 SecureRandom sr) throws KeyManagementException {
45 if (sr == null) {
43 engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) argument
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
H A DSecureRandom2Test.java99 MySecureRandom sr = new MySecureRandom(new MySecureRandomSpi(), p);
100 assertEquals("unknown", sr.getAlgorithm());
101 assertEquals(p, sr.getProvider());
103 sr = new MySecureRandom(new MySecureRandomSpi(), null);
104 sr = new MySecureRandom(null, p);
264 SecureRandom sr = new SecureRandom(spi, null) {
267 assertEquals("unknown", sr.getAlgorithm());
/libcore/crypto/src/main/java/org/conscrypt/
H A DSSLContextImpl.java86 * @param sr the randomness source or {@code null}
91 SecureRandom sr) throws KeyManagementException {
92 sslParameters = new SSLParametersImpl(kms, tms, sr,
90 engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) argument
H A DServerHello.java59 * @param sr
65 public ServerHello(SecureRandom sr, byte[] server_version, argument
68 sr.nextBytes(random);
H A DClientHello.java61 * @param sr
66 public ClientHello(SecureRandom sr, byte[] version, byte[] ses_id, argument
70 sr.nextBytes(random);
H A DDefaultSSLContextImpl.java127 SecureRandom sr) throws KeyManagementException {
126 engineInit(KeyManager[] kms, TrustManager[] tms, SecureRandom sr) argument
H A DSSLParametersImpl.java99 SecureRandom sr, ClientSessionContext clientSessionContext,
124 // if (sr == null) {
130 // secureRandom = sr;
138 secureRandom = sr;
98 SSLParametersImpl(KeyManager[] kms, TrustManager[] tms, SecureRandom sr, ClientSessionContext clientSessionContext, ServerSessionContext serverSessionContext) argument
/libcore/luni/src/main/java/javax/net/ssl/
H A DSSLContext.java212 * @param sr
217 public final void init(KeyManager[] km, TrustManager[] tm, SecureRandom sr) argument
219 spiImpl.engineInit(km, tm, sr);
H A DSSLContextSpi.java44 * @param sr
49 protected abstract void engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) argument
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DMySSLContextSpi.java46 SecureRandom sr) throws KeyManagementException {
47 if (sr == null) {
45 engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr) argument
/libcore/luni/src/test/java/tests/api/javax/net/ssl/
H A DSSLContextSpiTest.java153 * SSLContextSpi#engineInit(KeyManager[] km, TrustManager[] tm, SecureRandom sr)
169 SecureRandom sr = SecureRandom.getInstance("SHA1PRNG");
171 ssl.engineInit(km, tm, sr);
208 SecureRandom sr = SecureRandom.getInstance("SHA1PRNG");
209 ssl.engineInit(km, tm, sr);
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
H A DKeyGeneratorTest.java506 SecureRandom sr = new SecureRandom();
510 sr.nextBytes(iv);
/libcore/support/src/test/java/tests/resources/
H A Djunit4-4.3.1.jarMETA-INF/ META-INF/MANIFEST.MF junit/ junit/extensions/ junit/framework/ junit/runner/ junit/textui/ org/ ...

Completed in 285 milliseconds