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

123456789

/libcore/luni/src/main/java/javax/crypto/spec/
H A DSecretKeySpec.java31 * A key specification for a <code>SecretKey</code> and also a secret key
42 private final byte[] key; field in class:SecretKeySpec
46 * Creates a new <code>SecretKeySpec</code> for the specified key data and
49 * @param key
50 * the key data.
54 * if the key data or the algorithm name is null or if the key
57 public SecretKeySpec(byte[] key, String algorithm) { argument
58 if (key
93 SecretKeySpec(byte[] key, int offset, int len, String algorithm) argument
[all...]
H A DDESedeKeySpec.java24 * The key specification for a triple-DES (DES-EDE) key.
29 * The length of a DES-EDE key in bytes.
33 private final byte[] key; field in class:DESedeKeySpec
37 * {@link #DES_EDE_KEY_LEN}) bytes of the specified key data.
39 * @param key
40 * the key data.
42 * if the length of the key data is less than 24.
44 * if the key data is null.
46 public DESedeKeySpec(byte[] key) throw argument
72 DESedeKeySpec(byte[] key, int offset) argument
108 isParityAdjusted(byte[] key, int offset) argument
[all...]
H A DDESKeySpec.java24 * The key specification for a DES key.
29 * The length of a DES key in bytes.
33 private final byte[] key; field in class:DESKeySpec
94 * specified key data.
96 * @param key
97 * the key data.
99 * if the length of the specified key data is less than 8.
101 public DESKeySpec(byte[] key) throws InvalidKeyException { argument
102 this(key,
117 DESKeySpec(byte[] key, int offset) argument
153 isParityAdjusted(byte[] key, int offset) argument
190 isWeak(byte[] key, int offset) argument
[all...]
/libcore/luni/src/test/java/tests/security/interfaces/
H A DRSAPrivateCrtKeyTest.java25 RSAPrivateCrtKey key = null; field in class:RSAPrivateCrtKeyTest
30 key = (RSAPrivateCrtKey) gen.generatePrivate(Util.rsaCrtParam);
39 Util.rsaCrtParam.getCrtCoefficient(), key.getCrtCoefficient());
48 Util.rsaCrtParam.getPrimeExponentP(), key.getPrimeExponentP());
57 Util.rsaCrtParam.getPrimeExponentQ(), key.getPrimeExponentQ());
66 Util.rsaCrtParam.getPrimeP(), key.getPrimeP());
75 Util.rsaCrtParam.getPrimeQ(), key.getPrimeQ());
84 Util.rsaCrtParam.getPublicExponent(), key.getPublicExponent());
88 key = null;
H A DRSAKeyTest.java32 * Case 1: check private key
33 * Case 2: check public key
40 RSAKey key = null;
42 // Case 1: check private key
43 key = (RSAKey) gen.generatePrivate(new RSAPrivateKeySpec(n, d));
44 assertEquals("invalid modulus", n, key.getModulus());
46 // Case 2: check public key
47 key = (RSAKey) gen.generatePublic(new RSAPublicKeySpec(n, e));
48 assertEquals("invalid modulus", n, key.getModulus());
/libcore/luni/src/main/java/libcore/util/
H A DBasicLruCache.java39 * Returns the value for {@code key} if it exists in the cache or can be
44 public synchronized final V get(K key) { argument
45 if (key == null) {
46 throw new NullPointerException("key == null");
49 V result = map.get(key);
54 result = create(key);
57 map.put(key, result);
64 * Caches {@code value} for {@code key}. The value is moved to the head of
67 * @return the previous value mapped by {@code key}. Although that entry is
70 public synchronized final V put(K key, argument
98 entryEvicted(K key, V value) argument
105 create(K key) argument
[all...]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/interfaces/
H A DPBEKeyTest.java43 checkPBEKey key = new checkPBEKey();
45 key.getSerVerUID(), //PBEKey.serialVersionUID
50 checkPBEKey key = new checkPBEKey();
52 key.getIterationCount();
56 checkPBEKey key = new checkPBEKey();
58 key.getPassword();
62 checkPBEKey key = new checkPBEKey();
64 key.getSalt();
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
H A DSecretKeySpecTest.java38 * SecretKeySpec(byte[] key, String algorithm) method testing. Tests that
44 byte[] key = new byte[] {1, 2, 3, 4, 5};
50 + "in the case of empty key.");
57 + "in the case of null key.");
62 new SecretKeySpec(key, null);
68 SecretKeySpec ks = new SecretKeySpec(key, algorithm);
69 key[0] ++;
70 assertFalse("The change of key specified in the constructor "
72 key[0] == ks.getEncoded()[0]);
76 * SecretKeySpec(byte[] key, in
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DConcurrentMap.java20 * {@code ConcurrentMap} as a key or value
32 * If the specified key is not already associated
36 * if (!map.containsKey(key))
37 * return map.put(key, value);
39 * return map.get(key);}</pre>
43 * @param key key with which the specified value is to be associated
44 * @param value value to be associated with the specified key
45 * @return the previous value associated with the specified key, or
46 * <tt>null</tt> if there was no mapping for the key
60 putIfAbsent(K key, V value) argument
86 remove(Object key, Object value) argument
113 replace(K key, V oldValue, V newValue) argument
142 replace(K key, V value) argument
[all...]
/libcore/luni/src/test/java/tests/api/java/util/support/
H A DI.java4 String find(String key); argument
H A DA.java10 public String find(String key) { argument
11 return pp.findProp(key);
H A DP.java12 public String findProp(String key) { argument
13 return findProp(this.c, key);
16 private String findProp(Class cls, String key) { argument
20 ret = (String)b.getObject(key);
24 ret = findProp(cls.getSuperclass(), key);
/libcore/luni/src/main/java/java/util/
H A DDictionary.java48 * Returns the value which is associated with {@code key}.
50 * @param key
51 * the key of the value returned.
52 * @return the value associated with {@code key}, or {@code null} if the
53 * specified key does not exist.
56 public abstract V get(Object key); argument
59 * Returns true if this dictionary has no key/value pairs.
61 * @return {@code true} if this dictionary has no key/value pairs,
78 * Associate {@code key} with {@code value} in this dictionary. If {@code
79 * key} exist
92 put(K key, V value) argument
105 remove(Object key) argument
[all...]
H A DMissingResourceException.java33 String className, key; field in class:MissingResourceException
51 key = resourceName;
72 return key;
H A DMapEntry.java25 K key; field in class:MapEntry
33 key = theKey;
37 key = theKey;
57 return (key == null ? entry.getKey() == null : key.equals(entry
66 return key;
75 return (key == null ? 0 : key.hashCode())
87 return key + "=" + value;
H A DNavigableMap.java19 * greater than or equal, and greater than a given key, returning
20 * {@code null} if there is no such key. Similarly, methods
26 * ascending or descending key order. The {@code descendingMap}
68 * Returns a key-value mapping associated with the greatest key
69 * strictly less than the given key, or {@code null} if there is
70 * no such key.
72 * @param key the key
73 * @return an entry with the greatest key les
80 lowerEntry(K key) argument
94 lowerKey(K key) argument
109 floorEntry(K key) argument
123 floorKey(K key) argument
138 ceilingEntry(K key) argument
152 ceilingKey(K key) argument
167 higherEntry(K key) argument
181 higherKey(K key) argument
[all...]
/libcore/support/src/test/java/tests/security/
H A DCipherSymmetricCryptHelper.java31 public void test(SecretKey key) { argument
32 test(key, key);
/libcore/dom/src/test/java/org/w3c/domts/
H A DUserDataNotification.java23 private final String key; field in class:UserDataNotification
33 String key,
38 this.key = key;
54 * Gets value of key parameter
56 * @return value of key parameter
59 return key;
32 UserDataNotification(short operation, String key, Object data, Node src, Node dst) argument
/libcore/luni/src/main/java/java/nio/channels/spi/
H A DAbstractSelectableChannel.java41 * The collection of key.
82 * Gets this channel's selection key for the specified selector.
86 * @return the selection key for the channel or {@code null} if this channel
91 for (SelectionKey key : keyList) {
92 if (key != null && key.selector() == selector) {
93 return key;
103 * the corresponding selection key is returned. If the channel is not yet
105 * {@code selector} and adds the selection key to this channel's key se
[all...]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
H A DExemptionMechanismSpiTest.java66 protected void engineInit(Key key) throws InvalidKeyException, ExemptionMechanismException { argument
67 super.engineInit(key);
72 protected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException { argument
73 super.engineInit(key, params);
78 protected void engineInit(Key key, AlgorithmParameters params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException { argument
79 super.engineInit(key, params);
98 Key key = null;
102 emSpi.engineInit(key);
107 emSpi.engineInit(key, params);
112 emSpi.engineInit(key, parSpe
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/
H A DSystemScope.java43 // Identities hash: key is the identity name
46 // Identities hash: key is the public key
90 public synchronized Identity getIdentity(PublicKey key) { argument
91 if (key == null) {
94 return (Identity) keys.get(key);
110 PublicKey key = identity.getPublicKey();
111 if (key != null && keys.containsKey(key)) {
112 throw new KeyManagementException("key '"
[all...]
/libcore/luni/src/main/java/java/io/
H A DSerializationHandleMap.java31 /* Actual number of key-value pairs. */
53 Object key = oldKeys[i];
55 int index = findIndex(key, keys);
56 keys[index] = key;
62 public int get(Object key) { argument
63 int index = findIndex(key, keys);
64 if (keys[index] == key) {
71 * Returns the index where the key is found at, or the index of the next
72 * empty spot if the key is not found in this table.
74 private int findIndex(Object key, Objec argument
91 getModuloHash(Object key, int length) argument
95 put(Object key, int value) argument
124 remove(Object key) argument
[all...]
/libcore/luni/src/main/java/java/util/prefs/
H A DPreferences.java87 * Maximum size in characters allowed for a preferences key.
225 * Gets the {@code String} value mapped to the given key or its default
229 * case, if there is no value mapped to the given key, the stored default
233 * @param key
234 * the preference key.
237 * mapped to the given key or no backing store is available.
238 * @return the preference value mapped to the given key.
242 * if the parameter {@code key} is {@code null}.
244 public abstract String get(String key, String deflt); argument
247 * Gets the {@code boolean} value mapped to the given key o
272 getBoolean(String key, boolean deflt) argument
301 getByteArray(String key, byte[] deflt) argument
329 getDouble(String key, double deflt) argument
358 getFloat(String key, float deflt) argument
387 getInt(String key, int deflt) argument
415 getLong(String key, long deflt) argument
550 put(String key, String value) argument
569 putBoolean(String key, boolean value) argument
594 putByteArray(String key, byte[] value) argument
617 putDouble(String key, double value) argument
640 putFloat(String key, float value) argument
663 putInt(String key, int value) argument
686 putLong(String key, long value) argument
698 remove(String key) argument
[all...]
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/
H A DOpenSSLRSAPrivateKey.java28 private final OpenSSLKey key; field in class:OpenSSLRSAPrivateKey
36 OpenSSLRSAPrivateKey(OpenSSLKey key) { argument
37 this.key = key;
40 OpenSSLRSAPrivateKey(OpenSSLKey key, byte[][] params) { argument
41 this(key);
47 return key;
79 static OpenSSLRSAPrivateKey getInstance(OpenSSLKey key) { argument
80 byte[][] params = NativeCrypto.get_RSA_private_params(key.getPkeyContext());
82 return new OpenSSLRSAPrivateCrtKey(key, param
[all...]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DCertificateStub.java42 PublicKey key; field in class:CertificateStub
44 public CertificateStub(String format, Principal guarantor, Principal principal, PublicKey key){ argument
48 this.key = key;
98 return key;

Completed in 423 milliseconds

123456789