Searched refs:key (Results 126 - 150 of 300) sorted by relevance

1234567891011>>

/libcore/json/src/test/java/libcore/org/json/
H A DSelfUseTest.java60 @Override public boolean optBoolean(String key, boolean defaultValue) {
62 return super.optBoolean(key, defaultValue);
64 @Override public double optDouble(String key, double defaultValue) {
66 return super.optDouble(key, defaultValue);
68 @Override public int optInt(String key, int defaultValue) {
70 return super.optInt(key, defaultValue);
72 @Override public long optLong(String key, long defaultValue) {
74 return super.optLong(key, defaultValue);
76 @Override public String optString(String key, String defaultValue) {
78 return super.optString(key, defaultValu
[all...]
/libcore/ojluni/src/main/java/java/nio/file/
H A DFileTreeWalker.java69 private final Object key; field in class:FileTreeWalker.DirectoryNode
74 DirectoryNode(Path dir, Object key, DirectoryStream<Path> stream) { argument
76 this.key = key;
85 Object key() { method in class:FileTreeWalker.DirectoryNode
86 return key;
236 private boolean wouldLoop(Path dir, Object key) { argument
237 // if this directory and ancestor has a file key then we compare
240 Object ancestorKey = ancestor.key();
241 if (key !
[all...]
/libcore/luni/src/test/java/libcore/javax/crypto/
H A DCipherInputStreamTest.java71 private SecretKey key; field in class:CipherInputStreamTest
76 key = new SecretKeySpec(aesKeyBytes, "AES");
111 cipher.init(Cipher.DECRYPT_MODE, key, iv);
120 cipher.init(Cipher.DECRYPT_MODE, key, iv);
133 cipher.init(Cipher.ENCRYPT_MODE, key, iv);
157 cipher.init(Cipher.DECRYPT_MODE, key, iv);
173 cipher.init(Cipher.DECRYPT_MODE, key, iv);
190 cipher.init(Cipher.DECRYPT_MODE, key, iv);
198 cipher.init(Cipher.DECRYPT_MODE, key, iv);
223 cipher.init(Cipher.DECRYPT_MODE, key, i
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
H A DMockAbstractPreferences.java136 protected String getSpi(String key) { argument
141 if (null == key) {
144 return result == returnNull ? null : attr.getProperty(key);
183 protected void removeSpi(String key) { argument
188 if (null == key) {
191 attr.remove(key);
/libcore/ojluni/src/main/java/com/sun/security/cert/internal/x509/
H A DX509V1CertImpl.java123 * verification key provided. Successfully verifying a certificate
127 * @param key the public key used for verification.
129 public void verify(PublicKey key) argument
135 wrappedCert.verify(key);
143 * verification key provided. Successfully verifying a certificate
147 * @param key the public key used for verification.
150 public void verify(PublicKey key, String sigProvider) argument
156 wrappedCert.verify(key, sigProvide
[all...]
/libcore/ojluni/src/main/java/java/security/
H A DIdentity.java38 * <p>All Identity objects have a name and a public key. Names are
41 * key of the Identity are unique within that scope.
44 * public key). The Principal names specified in these certificates need
45 * not be the same, only the key.
74 * The public key for this identity.
154 * Returns this identity's public key.
156 * @return the public key for this identity.
165 * Sets this identity's public key. The old key and all of this
170 * as its argument to see if it's ok to set the public key
185 setPublicKey(PublicKey key) argument
[all...]
/libcore/ojluni/src/main/java/javax/crypto/
H A DSecretKeyFactory.java41 * cryptographic keys of type <code>Key</code>) into <I>key specifications</I>
42 * (transparent representations of the underlying key material), and vice
44 * Secret key factories operate only on secret (symmetric) keys.
47 * key object from a given key specification (key material), or to retrieve
48 * the underlying key material of a key object in a suitable format.
51 * to find out which key specifications are supported by the
55 * For example, the DES secret-key factor
559 getKeySpec(SecretKey key, Class<?> keySpec) argument
594 translateKey(SecretKey key) argument
[all...]
H A DSealedObject.java45 * the corresponding algorithm using the correct decryption key) and
49 * correct algorithm, key, padding scheme, etc., before being applied
62 * exact same algorithm, key, padding scheme, etc., that were used to seal the
66 * sealed object does not require knowledge of the decryption key. For example,
68 * decryption key, it could hand over the cipher object to
77 * given decryption key and the algorithm parameters (if any) that were stored
223 * <code>key</code> and the parameters (if any) that had been used in the
229 * @param key the key used to unseal the object.
238 * @exception InvalidKeyException if the given key canno
242 getObject(Key key) argument
341 getObject(Key key, String provider) argument
360 unseal(Key key, String provider) argument
[all...]
/libcore/ojluni/src/main/java/sun/net/www/
H A DURLConnection.java68 public void setRequestProperty(String key, String value) { argument
71 if (key == null)
72 throw new NullPointerException ("key cannot be null");
73 properties.set(key, value);
81 public void addRequestProperty(String key, String value) { argument
84 if (key == null)
85 throw new NullPointerException ("key is null");
88 public String getRequestProperty(String key) { argument
110 * Return the key for the nth header field. Returns null if
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/
H A DJarURLConnection.java236 * @param key the keyword by which the request is known
240 public void setRequestProperty(String key, String value) { argument
241 jarFileURLConnection.setRequestProperty(key, value);
251 public String getRequestProperty(String key) { argument
252 return jarFileURLConnection.getRequestProperty(key);
257 * key-value pair. This method will not overwrite
258 * existing values associated with the same key.
260 * @param key the keyword by which the request is known
264 public void addRequestProperty(String key, String value) { argument
265 jarFileURLConnection.addRequestProperty(key, valu
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DAbstractMapTest.java64 public Object put(Object key, Object value) { argument
103 Object key = new Object();
107 map1.put("key", value);
108 assertSame("HashMap(0)", map1.remove("key"), value);
111 map4.put(key, value);
112 assertSame("IdentityHashMap", map4.remove(key), value);
115 map5.put(key, value);
116 assertSame("LinkedHashMap", map5.remove(key), value);
124 map6.put(key, value);
125 assertSame("TreeMap", map6.remove(key), valu
[all...]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/support/
H A DMyCipher.java83 protected void engineInit(int opmode, Key key, SecureRandom random) argument
88 protected void engineInit(int opmode, Key key, argument
94 protected void engineInit(int opmode, Key key, AlgorithmParameters params, argument
/libcore/ojluni/src/main/java/java/security/cert/
H A DX509CRL.java182 * private key that corresponds to the given public key.
184 * @param key the PublicKey used to carry out the verification.
188 * @exception InvalidKeyException on incorrect key.
193 public abstract void verify(PublicKey key) argument
200 * private key that corresponds to the given public key.
204 * @param key the PublicKey used to carry out the verification.
209 * @exception InvalidKeyException on incorrect key.
214 public abstract void verify(PublicKey key, Strin argument
241 verify(PublicKey key, Provider sigProvider) argument
[all...]
H A DX509Certificate.java393 * supplied with the certificate's public key.
446 * The key usage extension defines the purpose (e.g., encipherment,
447 * signature, certificate signing) of the key contained in the
478 * extended key usage extension, (OID = 2.5.29.37). It indicates
479 * one or more purposes for which the certified public key may be
481 * indicated in the key usage extension field. The ASN.1
490 * need. Object identifiers used to identify key purposes shall be
652 * private key that corresponds to the specified public key.
662 * @param key th
673 verify(PublicKey key, Provider sigProvider) argument
[all...]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
H A DKeyPairGenerator4Test.java112 DSAPublicKey key = (DSAPublicKey) keyPairGenerator.genKeyPair()
114 DSAParams params = key.getParams();
130 DSAPublicKey key = (DSAPublicKey) keyPairGenerator.genKeyPair()
132 DSAParams params = key.getParams();
H A DKeyFactorySpiTest.java62 protected KeySpec engineGetKeySpec(Key key, Class keySpec){ argument
65 protected Key engineTranslateKey(Key key){ argument
H A DKeyStore3Test.java83 Key key = keyPair.getPrivate();
85 mockKeyStore.setKeyEntry("Alias", key, null, null);
92 mockKeyStore.setKeyEntry("Alias", key, null,
99 mockKeyStore.setKeyEntry("Alias", key, null, new Certificate[]{certificate});
105 Key key = keyPair.getPublic();
106 mockKeyStore.setKeyEntry("Alias1", key, null, null);
107 mockKeyStore.setKeyEntry("Alias2", key, null,
109 mockKeyStore.setKeyEntry("Alias3", key, null, new Certificate[]{certificate});
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DMyKeyStoreSpi.java68 public void engineSetKeyEntry(String alias, Key key, char[] password, argument
74 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) argument
163 public void verify(PublicKey key) { argument
167 public void verify(PublicKey key, String sigProvider) { argument
/libcore/support/src/test/java/tests/resources/x509/
H A Dcreate.sh25 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch > /tmp/cert-rsa-req.pem
40 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions keyUsage_extraLong_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-keyUsage-extraLong.der"
42 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions extendedKeyUsage_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-extendedKeyUsage.der"
44 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions ca_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-ca.der"
46 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions userWithPathLen_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-userWithPathLen.der"
48 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions caWithPathLen_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-caWithPathLen.der"
50 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions alt_other_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-alt-other.der"
52 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions alt_email_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-alt-email.der"
54 openssl req -config "$DIR/default.cnf" -new -key "$DIR/privkey.pem" -nodes -batch | openssl x509 -extfile "$DIR/default.cnf" -extensions alt_dns_cert -req -signkey "$DIR/privkey.pem" -outform d > "$DIR/cert-alt-dns.der"
56 openssl req -config "$DIR/default.cnf" -new -key "
[all...]
/libcore/ojluni/src/main/java/java/lang/
H A DSystem.java941 public Object put(Object key, Object value) { argument
942 if (defaults.containsKey(key)) {
943 logE("Ignoring attempt to set property \"" + key +
945 return defaults.get(key);
948 return super.put(key, value);
952 public Object remove(Object key) { argument
953 if (defaults.containsKey(key)) {
954 logE("Ignoring attempt to remove property \"" + key + "\".");
958 return super.remove(key);
965 String key
1078 setUnchangeableSystemProperty(String key, String value) argument
1239 getProperty(String key) argument
1275 getProperty(String key, String def) argument
1314 setProperty(String key, String value) argument
1352 clearProperty(String key) argument
1362 checkKey(String key) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/spi/
H A DMockAbstractSelector.java61 protected void mockDeregister(AbstractSelectionKey key) { argument
62 super.deregister(key);
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
H A DDESKeySpecTest.java156 * getKey() method testing. Checks that modification of returned key
157 * does not affect the internal key. Also test check an equality of
158 * the key with the key specified in the constructor. The object under
162 byte[] key = {1, 2, 3, 4, 5, 6, 7, 8};
165 ks = new DESKeySpec(key);
172 + "in constructor.", Arrays.equals(key, res));
174 assertFalse("The modification of returned key should not affect"
175 + "the underlying key.", key[
[all...]
/libcore/ojluni/src/main/java/javax/security/cert/
H A DCertificate.java38 * a public key is that of another principal. (A principal represents
45 * some types of information (like a public key).
129 * private key that corresponds to the specified public key.
131 * @param key the PublicKey used to carry out the verification.
135 * @exception InvalidKeyException on incorrect key.
140 public abstract void verify(PublicKey key) argument
147 * private key that corresponds to the specified public key.
151 * @param key th
159 verify(PublicKey key, String sigProvider) argument
[all...]
/libcore/ojluni/src/main/java/sun/security/util/
H A DAnchorCertificates.java91 String key = X509CertImpl.getFingerprint(HASH, cert);
92 boolean result = certs.contains(key);
/libcore/ojluni/src/main/java/sun/security/x509/
H A DKeyIdentifier.java48 * @param octetString the octet string identifying the key identifier.
64 * Creates a KeyIdentifier from a public-key value.
66 * <p>From RFC2459: Two common methods for generating key identifiers from
67 * the public key are:
79 * @param pubKey the public key from which to construct this KeyIdentifier
88 + "X.509 public key");
91 byte[] key = algAndKey.data.getUnalignedBitString().toByteArray();
99 md.update(key);

Completed in 505 milliseconds

1234567891011>>