Searched refs:key (Results 201 - 225 of 304) sorted by relevance

1234567891011>>

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
H A DReduceByOpTest.java56 Boolean key = entry.getKey();
57 assertEquals(entry.getValue(), data.stream().filter(e -> pEven.test(e) == key).reduce(0, rPlus));
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DKeyStoreTestSupport.java133 public void verify(PublicKey key) throws CertificateException, argument
138 public void verify(PublicKey key, String sigProvider) argument
H A DTestKeyStoreSpi.java197 public void engineSetKeyEntry(String alias, Key key, char[] password, argument
201 throw new KeyStoreException("alias is not a key enrty");
205 if (key instanceof PrivateKey)
212 aliases.put(alias, key);
216 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) argument
/libcore/ojluni/src/main/java/java/security/
H A DSignature.java73 * <li>a public key, which initializes the signature for
76 * <li>a private key (and optionally a Secure Random Number Generator),
540 * @param publicKey the public key of the identity whose signature is
543 * @exception InvalidKeyException if the key is invalid.
552 * Initializes this object for verification, using the public key from
554 * <p>If the certificate is of type X.509 and has a <i>key usage</i>
555 * extension field marked as critical, and the value of the <i>key usage</i>
556 * extension field implies that the public key in
557 * the certificate and its corresponding private key are not
564 * @exception InvalidKeyException if the public key i
1141 chooseProvider(int type, Key key, SecureRandom random) argument
1201 init(SignatureSpi spi, int type, Key key, SecureRandom random) argument
[all...]
H A DIdentityScope.java36 * optionally have a public key and associated certificates.
46 * there can only be one copy of one key per scope. For example, suppose
48 * Suppose it is an Identity, that is, it has a public key, and a set of
51 * public key. Of course, none has the same name as well.
201 * Retrieves the identity with the specified public key.
203 * @param key the public key for the identity to be returned.
205 * @return the identity with the given key, or null if there are
206 * no identities in this scope with that key.
208 public abstract Identity getIdentity(PublicKey key); argument
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DAttributedString.java38 * An attribute is a key/value pair, identified by the key. No two
39 * attributes on a given character can have the same key.
310 * @param attribute the attribute key
332 * @param attribute the attribute key
512 int keyValueIndex = -1; // index of key and value in our vectors; assume we don't have an entry yet
656 Attribute key = (Attribute) iterator.next();
657 if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {
1060 Attribute key
1076 get(Object key) argument
1084 private Attribute key; field in class:AttributeEntry
1087 AttributeEntry(Attribute key, Object value) argument
[all...]
/libcore/ojluni/src/main/java/java/util/
H A DLocale.java174 * <code>SUBTAG ('-' SUBTAG)*</code> where for the key 'x'
179 * <dd>Example: key="u"/value="ca-japanese" (Japanese Calendar),
180 * key="x"/value="java-1-7"</dd>
195 * key and type. For example, "nu-thai" indicates that Thai local
197 * (key:"nu").
200 * extension key 'u' ({@link #UNICODE_LOCALE_EXTENSION}). The above
210 * locale attributes and key/type pairs directly. When represented as
212 * alphabetically, followed by key/type sequences with keys listed
213 * alphabetically (the order of subtags comprising a key's type is
216 * <p>A well-formed locale key ha
759 createObject(LocaleKey key) argument
1114 getExtension(char key) argument
1166 getUnicodeLocaleType(String key) argument
2512 setExtension(char key, String value) argument
2542 setUnicodeLocaleKeyword(String key, String type) argument
[all...]
H A DComparableTimSort.java483 * Locates the position at which to insert the specified key into the
484 * specified sorted range; if the range contains an element equal to key,
487 * @param key the key whose insertion point to search for
493 * @return the int k, 0 <= k <= n such that a[b + k - 1] < key <= a[b + k],
495 * In other words, key belongs at index b + k; or in other words,
496 * the first k elements of a should precede key, and the last n - k
499 private static int gallopLeft(Comparable<Object> key, Object[] a, argument
505 if (key.compareTo(a[base + hint]) > 0) {
506 // Gallop right until a[base+hint+lastOfs] < key <
569 gallopRight(Comparable<Object> key, Object[] a, int base, int len, int hint) argument
[all...]
H A DTimSort.java516 * Locates the position at which to insert the specified key into the
517 * specified sorted range; if the range contains an element equal to key,
520 * @param key the key whose insertion point to search for
527 * @return the int k, 0 <= k <= n such that a[b + k - 1] < key <= a[b + k],
529 * In other words, key belongs at index b + k; or in other words,
530 * the first k elements of a should precede key, and the last n - k
533 private static <T> int gallopLeft(T key, T[] a, int base, int len, int hint, argument
538 if (c.compare(key, a[base + hint]) > 0) {
539 // Gallop right until a[base+hint+lastOfs] < key <
603 gallopRight(T key, T[] a, int base, int len, int hint, Comparator<? super T> c) argument
[all...]
H A DPriorityQueue.java652 Comparable<? super E> key = (Comparable<? super E>) x;
656 if (key.compareTo((E) e) >= 0)
661 queue[k] = key;
694 Comparable<? super E> key = (Comparable<? super E>)x;
703 if (key.compareTo((E) c) <= 0)
708 queue[k] = key;
/libcore/luni/src/test/java/libcore/javax/crypto/
H A DSecretKeyFactoryTest.java72 // PBEKeySpecs constructor without key length
198 SecretKey key = factory.generateSecret(ks);
199 assertTrue(Arrays.equals(expected, key.getEncoded()));
208 SecretKey key = factory.generateSecret(ks);
209 assertTrue(Arrays.equals(expected, key.getEncoded()));
/libcore/ojluni/src/main/java/javax/crypto/
H A DMacSpi.java57 * Initializes the MAC with the given (secret) key and algorithm
60 * @param key the (secret) key.
63 * @exception InvalidKeyException if the given key is inappropriate for
68 protected abstract void engineInit(Key key, argument
126 * maintaining the secret key that the MAC was initialized with.
133 * Resets the MAC for further use, maintaining the secret key that the
/libcore/ojluni/src/main/java/sun/net/www/
H A DHeaderParser.java51 /* table of key/val pairs */
95 if ((c == '=') && !inQuote) { // end of a key
114 } else if (c == ' ' || c == ',') { // end key/val, of whatever we're in
138 // get last key/val, if any
177 public String findValue(String key) { argument
178 return findValue(key, null);
197 boolean returnsValue; // or key
226 String key = (String)k.next();
231 sbuf.append (" {"+key+(val==null?"":","+val)+"}");
H A DMessageHeader.java46 the header that don't have a valid key, but do have
64 * Reset a message header (all key/values removed)
74 * Find the value that corresponds to this key.
75 * It finds only the first occurrence of the key.
76 * @param k the key to find.
92 // return the location of the key
113 * Find the next value that corresponds to this key.
115 * over all the values of a key use:
143 * appears. All Performed on headers with key being k.
181 String key; field in class:MessageHeader.HeaderIterator
[all...]
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
H A DAlgorithmChecker.java64 * Certificate fields such as the subject public key, the signature
65 * algorithm, key usage, extended key usage, etc. need to conform to
205 // check the key usage and key size
249 // Check with previous cert for signature algorithm and public key
261 // Inherit key parameters from previous key
263 // Inherit DSA parameters from previous key
265 throw new CertPathValidatorException("Input key i
332 check(PublicKey key, X509CRL crl) argument
352 check(PublicKey key, AlgorithmId algorithmId) argument
[all...]
H A DX509CertificatePair.java52 * the subject public key in one certificate shall be capable of verifying the
54 * public key in one certificate does not contain required key algorithm
55 * parameters, then the signature check involving that key is not done.<p>
141 Object key = new Cache.EqualByteArray(encoded);
142 X509CertificatePair pair = cache.get(key);
147 key = new Cache.EqualByteArray(pair.encoded);
148 cache.put(key, pair);
313 /* check signatures unless key parameters are missing */
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/
H A DFtpURLConnection.java576 * Sets the general request property. If a property with the key already
579 * @param key the keyword by which the request is known
586 public void setRequestProperty(String key, String value) { argument
587 super.setRequestProperty(key, value);
588 if ("type".equals(key)) {
597 "Value of '" + key +
608 * @param key the keyword by which the request is known (e.g., "accept").
615 public String getRequestProperty(String key) { argument
616 String value = super.getRequestProperty(key);
619 if ("type".equals(key)) {
[all...]
/libcore/ojluni/src/main/java/java/net/
H A DURLConnection.java660 * Returns the key for the <code>n</code><sup>th</sup> header field.
664 * @return the key for the <code>n</code><sup>th</sup> header field,
1055 * Sets the general request property. If a property with the key already
1059 * legally have multiple instances with the same key
1063 * @param key the keyword by which the request is known
1067 * @throws NullPointerException if key is <CODE>null</CODE>
1070 public void setRequestProperty(String key, String value) { argument
1073 if (key == null)
1074 throw new NullPointerException ("key is null");
1079 requests.set(key, valu
1095 addRequestProperty(String key, String value) argument
1118 getRequestProperty(String key) argument
1168 setDefaultRequestProperty(String key, String value) argument
1188 getDefaultRequestProperty(String key) argument
[all...]
/libcore/ojluni/src/main/java/sun/net/www/protocol/http/
H A DHttpURLConnection.java407 private boolean isRestrictedHeader(String key, String value) { argument
412 key = key.toLowerCase();
413 if (restrictedHeaderSet.contains(key)) {
419 if (key.equals("connection") && value.equalsIgnoreCase("close")) {
423 } else if (key.startsWith("sec-")) {
434 private boolean isExternalMessageHeaderAllowed(String key, String value) { argument
435 checkMessageHeader(key, value);
436 if (!isRestrictedHeader(key, value)) {
460 private void checkMessageHeader(String key, Strin argument
2746 setRequestProperty(String key, String value) argument
2769 addRequestProperty(String key, String value) argument
2784 setAuthenticationProperty(String key, String value) argument
2790 getRequestProperty(String key) argument
[all...]
/libcore/ojluni/src/main/java/sun/util/calendar/
H A DLocalGregorianCalendar.java158 // it must be in the key=value form.
162 String key = item.substring(0, index);
164 if ("name".equals(key)) {
166 } else if ("since".equals(key)) {
173 } else if ("abbr".equals(key)) {
176 throw new RuntimeException("Unknown key word: " + key);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DHashtableTest.java196 assertTrue("Failed to find key", htfull.containsKey("FKey 4"));
197 assertTrue("Failed to find key", !htfull.containsKey("FKey 99"));
237 assertTrue("Missing key from enumeration", elmVector.contains(s));
426 assertTrue("Missing key from enumeration", keyVector.contains(s));
469 assertTrue("Returned incorrect key set", s
519 assertTrue("should contain key", s1.remove("Key 0"));
520 assertTrue("should not contain key", !s1.remove("Key 0"));
574 // String key = (String) it.next();
575 // if ("12".equals(key) || "9".equals(key)) {
[all...]
/libcore/ojluni/src/main/java/sun/security/x509/
H A DX509CertImpl.java108 // x509.info.key.value
142 // number of standard key usage bits.
394 * verification key provided. Successfully verifying a certificate
398 * @param key the public key used for verification.
400 * @exception InvalidKeyException on incorrect key.
407 public void verify(PublicKey key) argument
411 verify(key, "");
416 * verification key provided. Successfully verifying a certificate
420 * @param key th
430 verify(PublicKey key, String sigProvider) argument
489 verify(PublicKey key, Provider sigProvider) argument
522 verify(X509Certificate cert, PublicKey key, Provider sigProvider) argument
544 sign(PrivateKey key, String algorithm) argument
567 sign(PrivateKey key, String algorithm, String provider) argument
[all...]
/libcore/luni/src/test/java/tests/security/cert/
H A DX509CertSelectorTest.java749 PublicKey key = selector.getSubjectPublicKey();
750 assertEquals("0.3.5", key.getAlgorithm());
751 assertEquals("X.509", key.getFormat());
752 assertTrue(Arrays.equals(enc, key.getEncoded()));
753 assertNotNull(key.toString());
755 key = new MyPublicKey();
757 selector.setSubjectPublicKey(key);
759 assertEquals(key, keyActual);
760 assertEquals(key.getAlgorithm(), keyActual.getAlgorithm());
1461 PublicKey key
1606 protected PublicKey key = null; field in class:X509CertSelectorTest.TestCert
1663 TestCert(PublicKey key) argument
1699 setPublicKey(PublicKey key) argument
1849 verify(PublicKey key) argument
1854 verify(PublicKey key, String sigProvider) argument
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DScheduledThreadPoolExecutor.java888 private void siftUp(int k, RunnableScheduledFuture<?> key) { argument
892 if (key.compareTo(e) >= 0)
898 queue[k] = key;
899 setIndex(key, k);
906 private void siftDown(int k, RunnableScheduledFuture<?> key) { argument
914 if (key.compareTo(c) <= 0)
920 queue[k] = key;
921 setIndex(key, k);
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
H A DCipherOutputStream1Test.java199 Key key = kg.generateKey();
202 c.init(Cipher.ENCRYPT_MODE, key);

Completed in 868 milliseconds

1234567891011>>