Home
last modified time | relevance | path

Searched refs:keys (Results 1 – 25 of 80) sorted by relevance

1234

/libcore/ojluni/src/main/java/java/nio/channels/spi/
DAbstractSelectableChannel.java61 private SelectionKey[] keys = null; field in AbstractSelectableChannel
98 if ((keys != null) && (keyCount < keys.length)) { in addKey()
100 for (i = 0; i < keys.length; i++) in addKey()
101 if (keys[i] == null) in addKey()
103 } else if (keys == null) { in addKey()
104 keys = new SelectionKey[3]; in addKey()
107 int n = keys.length * 2; in addKey()
109 for (i = 0; i < keys.length; i++) in addKey()
110 ks[i] = keys[i]; in addKey()
111 keys = ks; in addKey()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DMembershipRegistry.java55 List<MembershipKeyImpl> keys = groups.get(group); in checkMembership() local
56 if (keys != null) { in checkMembership()
57 for (MembershipKeyImpl key: keys) { in checkMembership()
85 List<MembershipKeyImpl> keys; in add() local
88 keys = null; in add()
90 keys = groups.get(group); in add()
92 if (keys == null) { in add()
93 keys = new LinkedList<MembershipKeyImpl>(); in add()
94 groups.put(group, keys); in add()
96 keys.add(key); in add()
[all …]
DSelectorImpl.java47 protected HashSet<SelectionKey> keys; field in SelectorImpl
55 keys = new HashSet<SelectionKey>(); in SelectorImpl()
58 publicKeys = keys; in SelectorImpl()
61 publicKeys = Collections.unmodifiableSet(keys); in SelectorImpl()
66 public Set<SelectionKey> keys() { in keys() method in SelectorImpl
/libcore/ojluni/src/main/java/sun/net/www/
DMessageHeader.java45 private String keys[]; field in MessageHeader
63 joiner.add(keys[i]); in getHeaderNamesInList()
72 keys = null; in reset()
87 if (keys[i] == null) in findValue()
91 if (k.equalsIgnoreCase(keys[i])) in findValue()
100 if ((keys[i] == k) || in getKey()
101 (k != null && k.equalsIgnoreCase(keys[i]))) in getKey()
108 return keys[n]; in getKey()
131 if (keys[i] == null) in findNextValue()
138 if (k.equalsIgnoreCase(keys[i])) in findNextValue()
[all …]
/libcore/luni/src/test/java/tests/security/interfaces/
DDSAPublicKeyTest.java39 KeyPair keys = null; in test_getY() local
46 keys = keyGen.generateKeyPair(); in test_getY()
47 priv = (DSAPrivateKey) keys.getPrivate(); in test_getY()
48 publ = (DSAPublicKey) keys.getPublic(); in test_getY()
54 keys = keyGen.generateKeyPair(); in test_getY()
55 priv = (DSAPrivateKey) keys.getPrivate(); in test_getY()
56 publ = (DSAPublicKey) keys.getPublic(); in test_getY()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyFactory2Test.java117 KeyPair keys = keyGen.generateKeyPair(); in test_generatePrivateLjava_security_spec_KeySpec() local
122 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(), in test_generatePrivateLjava_security_spec_KeySpec()
126 Arrays.toString(keys.getPrivate().getEncoded()), in test_generatePrivateLjava_security_spec_KeySpec()
128 … privateKey = fact.generatePrivate(new PKCS8EncodedKeySpec(keys.getPrivate().getEncoded())); in test_generatePrivateLjava_security_spec_KeySpec()
130 Arrays.toString(keys.getPrivate().getEncoded()), in test_generatePrivateLjava_security_spec_KeySpec()
147 KeyPair keys = keyGen.generateKeyPair(); in test_generatePublicLjava_security_spec_KeySpec() local
151 KeySpec publicKeySpec = fact.getKeySpec(keys.getPublic(), in test_generatePublicLjava_security_spec_KeySpec()
158 Arrays.toString(keys.getPublic().getEncoded()), in test_generatePublicLjava_security_spec_KeySpec()
239 KeyPair keys = keyGen.generateKeyPair(); in test_getKeySpecLjava_security_KeyLjava_lang_Class() local
243 KeySpec privateKeySpec = fact.getKeySpec(keys.getPrivate(), in test_getKeySpecLjava_security_KeyLjava_lang_Class()
[all …]
DKeyPairGenerator1Test.java349 int[] keys = { -10000, -1024, -1, 0, 10000 }; in testKeyPairGenerator11() local
357 for (int j = 0; j < keys.length; j++) { in testKeyPairGenerator11()
359 kpg[i].initialize(keys[j]); in testKeyPairGenerator11()
360 kpg[i].initialize(keys[j], random); in testKeyPairGenerator11()
386 int[] keys = { -1, -250, 1, 64, 512, 1024 }; in testKeyPairGenerator12() local
396 for (int i = 0; i < keys.length; i++) { in testKeyPairGenerator12()
398 mKPG.initialize(keys[i]); in testKeyPairGenerator12()
400 + Integer.toString(keys[i]) + ")"); in testKeyPairGenerator12()
404 mKPG.initialize(keys[i], random); in testKeyPairGenerator12()
406 + Integer.toString(keys[i]) + ")"); in testKeyPairGenerator12()
[all …]
DKeyFactoryTest.java286 Key[] keys = { in testGetKeySpec() local
300 for (int i = 0; i < keys.length; i++) { in testGetKeySpec()
301 Key key = keys[i]; in testGetKeySpec()
315 Key[] keys = { in testGetKeySpec() local
336 for (int i = 0; i < keys.length; i++) { in testGetKeySpec()
337 Key key = keys[i]; in testGetKeySpec()
368 Key[] keys = { in testTranslateKey() local
378 for (int i = 0; i < keys.length; i++) { in testTranslateKey()
379 Key key = keys[i]; in testTranslateKey()
392 Key[] keys = { in testTranslateKey() local
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DListResourceBundleTest.java35 Enumeration<String> keys = bundle.getKeys(); in test_getKeys() local
37 while (keys.hasMoreElements()) { in test_getKeys()
38 result.addElement(keys.nextElement()); in test_getKeys()
54 Enumeration keys = bundle.getKeys(); in test_handleGetObjectLjava_lang_String() local
57 while (keys.hasMoreElements()) { in test_handleGetObjectLjava_lang_String()
58 result.addElement(bundle.handleGetObject((String)keys.nextElement())); in test_handleGetObjectLjava_lang_String()
DWeakHashMapTest.java186 List keys = Arrays.asList(keyArray); in test_entrySet() local
194 assertTrue("Invalid map entry returned--bad key", keys.contains(entry.getKey())); in test_entrySet()
197 keys = null; in test_entrySet()
295 List keys = Arrays.asList(keyArray); in test_keySet() local
303 assertTrue("Invalid map entry returned--bad key", keys.contains(key)); in test_keySet()
305 keys = null; in test_keySet()
381 List keys = Arrays.asList(keyArray); in test_values() local
391 keys = null; in test_values()
537 Set<String> keys = hashMap.keySet(); in test_spliterator_keySet() local
538 ArrayList<String> expectedKeys = new ArrayList<>(keys); in test_spliterator_keySet()
[all …]
DHashtableTest.java144 Enumeration keys = h.keys(); in test_clear() local
146 && !(keys.hasMoreElements())); in test_clear()
159 Enumeration org = htfull.keys(); in test_clone()
160 Enumeration cpy = h.keys(); in test_clone()
422 Enumeration keys = ht10.keys(); in test_keys() local
424 while (keys.hasMoreElements()) { in test_keys()
425 String s = (String) keys.nextElement(); in test_keys()
432 assertFalse(keys.hasMoreElements()); in test_keys()
434 keys.nextElement(); in test_keys()
448 Enumeration en = ht.keys(); in test_keys_subtest0()
[all …]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DSystemScope.java49 private Hashtable keys = new Hashtable(); field in SystemScope
96 return (Identity) keys.get(key); in getIdentity()
113 if (key != null && keys.containsKey(key)) { in addIdentity()
119 keys.put(key, identity); in addIdentity()
145 contains = contains || keys.containsKey(key); in removeIdentity()
146 keys.remove(key); in removeIdentity()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DX509KeyManagerTest.java32 private PrivateKey[] keys; field in X509KeyManagerTest
631 keys = new PrivateKey[3]; in init()
632 keys[0] = kf.generatePrivate(new PKCS8EncodedKeySpec(keyBytes)); in init()
633 keys[1] = kf.generatePrivate(new PKCS8EncodedKeySpec(key2Bytes)); in init()
634 keys[2] = kf.generatePrivate(new PKCS8EncodedKeySpec(key3Bytes)); in init()
639 … keyTest.setKeyEntry("clientKey_01", keys[0], PASSWORD, new X509Certificate[] {cert[0]}); in init()
640 … keyTest.setKeyEntry("clientKey_02", keys[1], PASSWORD, new X509Certificate[] {cert[0], cert[1]}); in init()
641 … keyTest.setKeyEntry("clientKey_03", keys[2], PASSWORD, new X509Certificate[] {cert[0], cert[2]}); in init()
646 keys = new PrivateKey[1]; in init()
647 keys[0] = kf.generatePrivate(new PKCS8EncodedKeySpec(keyBytes)); in init()
[all …]
DHandshakeCompletedEventTest.java391 String keys; field in HandshakeCompletedEventTest.TestServer
397 public TestServer(boolean provideKeys, int clientAuth, String keys) throws Exception { in TestServer() argument
398 this.keys = keys; in TestServer()
404 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null; in TestServer()
472 private String keys; field in HandshakeCompletedEventTest.TestClient
476 public TestClient(boolean provideKeys, String keys) { in TestClient() argument
477 this.keys = keys; in TestClient()
485 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null; in run()
534 private KeyManager[] getKeyManagers(String keys) throws Exception { in getKeyManagers() argument
535 byte[] bytes = Base64.getDecoder().decode(keys.getBytes()); in getKeyManagers()
DSSLSessionTest.java464 String keys; field in SSLSessionTest.TestServer
472 public TestServer(boolean provideKeys, int clientAuth, String keys) throws Exception { in TestServer() argument
473 this.keys = keys; in TestServer()
479 store = provideKeys ? getKeyStore(keys) : null; in TestServer()
547 private String keys; field in SSLSessionTest.TestClient
553 public TestClient(boolean provideKeys, String keys) { in TestClient() argument
554 this.keys = keys; in TestClient()
562 store = provideKeys ? getKeyStore(keys) : null; in run()
608 private KeyStore getKeyStore(String keys) throws Exception { in getKeyStore() argument
609 byte[] bytes = Base64.getDecoder().decode(keys.getBytes()); in getKeyStore()
DSSLSocketTest.java488 String keys = useBKS ? SERVER_KEYS_BKS : SERVER_KEYS_JKS; in startServer() local
489 TestServer server = new TestServer(true, keys); in startServer()
524 String keys; field in SSLSocketTest.TestServer
530 public TestServer(boolean provideKeys, String keys) { in TestServer() argument
531 this.keys = keys; in TestServer()
539 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null; in run()
592 private KeyManager[] getKeyManagers(String keys) throws Exception { in getKeyManagers() argument
593 byte[] bytes = Base64.getDecoder().decode(keys.getBytes()); in getKeyManagers()
/libcore/ojluni/src/main/java/java/security/
DSigner.java156 String keys = ""; in printKeys() local
159 keys = "\tpublic and private keys initialized"; in printKeys()
162 keys = "\tno keys"; in printKeys()
164 return keys; in printKeys()
/libcore/luni/src/test/java/tests/security/spec/
DEncodedKeySpec2Test.java42 KeyPair keys = keyGen.generateKeyPair(); in test_getEncoded() local
49 byte[] encoded = keys.getPublic().getEncoded(); in test_getEncoded()
53 isEqual(key, keys.getPublic())); in test_getEncoded()
56 encoded = keys.getPrivate().getEncoded(); in test_getEncoded()
60 isEqual(key, keys.getPrivate())); in test_getEncoded()
/libcore/json/src/test/java/libcore/org/json/
DJSONArrayTest.java330 JSONArray keys = new JSONArray(); in testToJSONObject() local
331 keys.put("a"); in testToJSONObject()
332 keys.put("b"); in testToJSONObject()
338 JSONObject object = values.toJSONObject(keys); in testToJSONObject()
342 keys.put(0, "a"); in testToJSONObject()
348 JSONArray keys = new JSONArray(); in testToJSONObjectWithNulls() local
349 keys.put("a"); in testToJSONObjectWithNulls()
350 keys.put("b"); in testToJSONObjectWithNulls()
357 JSONObject object = values.toJSONObject(keys); in testToJSONObjectWithNulls()
364 JSONArray keys = new JSONArray(); in testToJSONObjectMoreNamesThanValues() local
[all …]
/libcore/ojluni/src/main/java/java/io/
DExpiringCache.java122 String[] keys = new String[keySet.size()]; in cleanup() local
125 keys[i++] = key; in cleanup()
127 for (int j = 0; j < keys.length; j++) { in cleanup()
128 entryFor(keys[j]); in cleanup()
/libcore/ojluni/src/main/java/java/util/stream/
DDistinctOps.java93 Set<T> keys = map.keySet(); in makeRef() local
96 keys = new HashSet<>(keys); in makeRef()
97 keys.add(null); in makeRef()
99 return Nodes.node(keys); in makeRef()
/libcore/luni/src/test/java/libcore/java/util/
DHashMapTest.java98 Set<String> keys = m.keySet(); in test_spliterator_keySet() local
99 SpliteratorTester.runBasicIterationTests(keys.spliterator(), expectedKeys); in test_spliterator_keySet()
100 SpliteratorTester.runBasicSplitTests(keys, expectedKeys); in test_spliterator_keySet()
101 SpliteratorTester.testSpliteratorNPE(keys.spliterator()); in test_spliterator_keySet()
102 SpliteratorTester.runSizedTests(keys.spliterator(), 10); in test_spliterator_keySet()
104 keys.spliterator().characteristics()); in test_spliterator_keySet()
105 SpliteratorTester.assertSupportsTrySplit(keys); in test_spliterator_keySet()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSelectorTest.java107 Set<SelectionKey> keySet = selector.keys(); in test_keys()
108 Set<SelectionKey> keySet2 = selector.keys(); in test_keys()
140 selector.keys(); in test_keys()
331 Set<SelectionKey> keys = selector.keys();
335 assertTrue(keys.contains(key1));
341 assertTrue(keys.contains(key1));
342 assertTrue(keys.contains(key2));
345 assertTrue(keys.contains(key1));
348 assertFalse(keys.contains(key1));
349 assertTrue(keys.contains(key2));
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DCipherWrapThread.java26 CipherWrapThread(String name, int[] keys, String[] modes, String[] paddings) { in CipherWrapThread() argument
27 super(name, keys, modes, paddings); in CipherWrapThread()
DCipherRSAThread.java26 CipherRSAThread(String name, int[] keys, String[] modes, String[] paddings) { in CipherRSAThread() argument
27 super(name, keys, modes, paddings); in CipherRSAThread()

1234