/libcore/ojluni/src/main/java/java/nio/channels/spi/ |
D | AbstractSelectableChannel.java | 61 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/ |
D | MembershipRegistry.java | 55 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 …]
|
D | SelectorImpl.java | 47 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/ |
D | MessageHeader.java | 45 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/support/src/test/java/tests/security/ |
D | DefaultKeys.java | 185 private static final HashMap<String, KeySpec> keys = new HashMap<String, KeySpec>(); field in DefaultKeys 187 keys.put("DH_public", new X509EncodedKeySpec(DH_public)); 188 keys.put("DH_private", new PKCS8EncodedKeySpec(DH_private)); 189 keys.put("DSA_public", new X509EncodedKeySpec(DSA_public)); 190 keys.put("DSA_private", new PKCS8EncodedKeySpec(DSA_private)); 191 keys.put("RSA_public", new X509EncodedKeySpec(RSA_public)); 192 keys.put("RSA_private", new PKCS8EncodedKeySpec(RSA_private)); 198 return factory.generatePrivate(keys.get(algorithmName + "_private")); in getPrivateKey() 204 return factory.generatePublic(keys.get(algorithmName + "_public")); in getPublicKey()
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
D | DSAPublicKeyTest.java | 39 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ListResourceBundleTest.java | 35 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()
|
D | WeakHashMapTest.java | 186 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 …]
|
D | HashtableTest.java | 144 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/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyFactory2Test.java | 117 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 …]
|
D | KeyPairGenerator1Test.java | 349 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 …]
|
D | KeyFactoryTest.java | 286 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/support/src/test/java/org/apache/harmony/security/tests/support/ |
D | SystemScope.java | 49 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/ |
D | X509KeyManagerTest.java | 32 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 …]
|
D | HandshakeCompletedEventTest.java | 391 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() 474 private String keys; field in HandshakeCompletedEventTest.TestClient 478 public TestClient(boolean provideKeys, String keys) { in TestClient() argument 479 this.keys = keys; in TestClient() 487 KeyManager[] keyManagers = provideKeys ? getKeyManagers(keys) : null; in run() 537 private KeyManager[] getKeyManagers(String keys) throws Exception { in getKeyManagers() argument 538 byte[] bytes = Base64.getDecoder().decode(keys.getBytes()); in getKeyManagers()
|
D | SSLSessionTest.java | 485 String keys; field in SSLSessionTest.TestServer 493 public TestServer(boolean provideKeys, int clientAuth, String keys) throws Exception { in TestServer() argument 494 this.keys = keys; in TestServer() 500 store = provideKeys ? getKeyStore(keys) : null; in TestServer() 568 private String keys; field in SSLSessionTest.TestClient 574 public TestClient(boolean provideKeys, String keys) { in TestClient() argument 575 this.keys = keys; in TestClient() 583 store = provideKeys ? getKeyStore(keys) : null; in run() 629 private KeyStore getKeyStore(String keys) throws Exception { in getKeyStore() argument 630 byte[] bytes = Base64.getDecoder().decode(keys.getBytes()); in getKeyStore()
|
/libcore/ojluni/src/main/java/java/security/ |
D | Signer.java | 156 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/ |
D | EncodedKeySpec2Test.java | 42 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/org/json/ |
D | JSONArrayTest.java | 325 JSONArray keys = new JSONArray(); in testToJSONObject() local 326 keys.put("a"); in testToJSONObject() 327 keys.put("b"); in testToJSONObject() 333 JSONObject object = values.toJSONObject(keys); in testToJSONObject() 337 keys.put(0, "a"); in testToJSONObject() 343 JSONArray keys = new JSONArray(); in testToJSONObjectWithNulls() local 344 keys.put("a"); in testToJSONObjectWithNulls() 345 keys.put("b"); in testToJSONObjectWithNulls() 352 JSONObject object = values.toJSONObject(keys); in testToJSONObjectWithNulls() 359 JSONArray keys = new JSONArray(); in testToJSONObjectMoreNamesThanValues() local [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | ExpiringCache.java | 122 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/ |
D | DistinctOps.java | 92 Set<T> keys = map.keySet(); in makeRef() local 95 keys = new HashSet<>(keys); in makeRef() 96 keys.add(null); in makeRef() 98 return Nodes.node(keys); in makeRef()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | HashMapTest.java | 98 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/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
D | CipherWrapThread.java | 26 CipherWrapThread(String name, int[] keys, String[] modes, String[] paddings) { in CipherWrapThread() argument 27 super(name, keys, modes, paddings); in CipherWrapThread()
|
D | CipherRSAThread.java | 26 CipherRSAThread(String name, int[] keys, String[] modes, String[] paddings) { in CipherRSAThread() argument 27 super(name, keys, modes, paddings); in CipherRSAThread()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SelectorTest.java | 107 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));
|