/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | KeyFactoryTest.java | 189 TestPublicKey key = new TestPublicKey(); 190 TestPublicKeySpec keySpec = new TestPublicKeySpec(key); 193 assertTrue(Arrays.equals(key.encoded, publicKey.getEncoded())); 238 TestPrivateKey key = new TestPrivateKey(); 239 TestPrivateKeySpec keySpec = new TestPrivateKeySpec(key); 242 assertTrue(Arrays.equals(key.getEncoded(), privateKey.getEncoded())); 301 Key key = keys[i]; 303 String message = "getKeySpec(" + key.toString() + ", " + keySpec.toString() + ")"; 305 KeySpec spec = factory.getKeySpec(key, keySpec); 337 Key key 451 engineGetKeySpec(Key key, Class<T> keySpec) argument 495 engineTranslateKey(Key key) argument 510 TestPrivateKeySpec(TestPrivateKey key) argument 519 TestPublicKeySpec(TestPublicKey key) argument [all...] |
H A D | Security2Test.java | 45 String key = (String) k; 47 if (!isAlias(key) && !isProviderData(key)) { 48 addOrIncrementTable(allSupported, key); 58 String key = (String) entry.getKey(); 59 if (isAlias(key)) { 60 String aliasName = key.substring("ALG.ALIAS.".length()).toUpperCase(); 96 private boolean isProviderData(String key) { argument 97 return key.toUpperCase().startsWith("PROVIDER."); 100 private boolean isAlias(String key) { argument [all...] |
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | CipherInputStreamBenchmark.java | 49 private SecretKey key; field in class:CipherInputStreamBenchmark 61 key = generator.generateKey(); 66 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); 71 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec);
|
H A D | CipherBenchmark.java | 88 private SecretKey key; field in class:CipherBenchmark 104 key = KEY_SIZES.get(keySize); 105 if (key == null) { 108 key = generator.generateKey(); 109 KEY_SIZES.put(keySize, key); 128 cipherEncrypt.init(Cipher.ENCRYPT_MODE, key, spec); 131 cipherDecrypt.init(Cipher.DECRYPT_MODE, key, spec);
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | SecretKeyFactorySpiTest.java | 46 protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec) argument 48 return super.engineGetKeySpec(key, keySpec); 52 protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException { argument 53 return super.engineTranslateKey(key);
|
/libcore/ojluni/src/main/java/javax/crypto/ |
H A D | NullCipherSpi.java | 69 protected void engineInit(int mode, Key key, SecureRandom random) {} argument 71 protected void engineInit(int mode, Key key, argument 75 protected void engineInit(int mode, Key key, argument 109 protected int engineGetKeySize(Key key) argument
|
H A D | Mac.java | 47 * medium, based on a secret key. Typically, message 49 * key in order to validate information transmitted between these 54 * e.g., MD5 or SHA-1, in combination with a secret shared key. HMAC is 363 private void chooseProvider(Key key, AlgorithmParameterSpec params) argument 366 if (spi != null && (key == null || lock == null)) { 367 spi.engineInit(key, params); 372 // if provider says it does not support this key, ignore it 373 if (s.supportsParameter(key) == false) { 381 spi.engineInit(key, params); 404 String kName = (key ! 439 init(Key key) argument 464 init(Key key, AlgorithmParameterSpec params) argument [all...] |
/libcore/ojluni/src/main/java/sun/util/locale/ |
H A D | BaseLocale.java | 85 Key key = new Key(language, script, region, variant); 86 BaseLocale baseLocale = CACHE.get(key); 276 public static Key normalize(Key key) { argument 277 if (key.normalized) { 278 return key; 281 String lang = LocaleUtils.toLowerString(key.lang).intern(); 282 String scrt = LocaleUtils.toTitleString(key.scrt).intern(); 283 String regn = LocaleUtils.toUpperString(key.regn).intern(); 284 String vart = key.vart.intern(); // preserve upper/lower cases 296 protected Key normalizeKey(Key key) { argument 301 createObject(Key key) argument [all...] |
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
H A D | LoggingTestCase.java | 60 protected void setContext(String key, Object value) { argument 61 context.put(key, value); 64 protected void clearContext(String key) { argument 65 context.remove(key);
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
H A D | LoggingTestCase.java | 60 protected void setContext(String key, Object value) { argument 61 context.put(key, value); 64 protected void clearContext(String key) { argument 65 context.remove(key);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | SortedMapTestBase.java | 62 int key = rnd.nextInt(N); 63 assertEquals(ref.containsKey(key), map.containsKey(key)); 91 int key = rnd.nextInt(N); 92 assertEquals(ref.get(key), map.get(key)); 113 int key = rnd.nextInt(N); 115 assertEquals(ref.put(key, value), map.put(key, value)); 116 assertEquals(ref.get(key), ma [all...] |
/libcore/json/src/test/java/org/json/ |
H A D | JSONStringerTest.java | 78 stringer.key("a").value(false); 79 stringer.key("b").value(5.0); 80 stringer.key("c").value(5L); 81 stringer.key("d").value("five"); 82 stringer.key("e").value(null); 131 new JSONStringer().key("a"); 161 new JSONStringer().object().key("a").key("a"); 174 new JSONStringer().object().key(null); 183 stringer.key(" [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
H A D | CipherSymmetricKeyThread.java | 44 Key key = kg.generateKey(); 56 cip.init(Cipher.ENCRYPT_MODE, key, ivspec); 61 cip.init(Cipher.DECRYPT_MODE, key, ivspec); 64 cip.init(Cipher.ENCRYPT_MODE, key); 67 cip.init(Cipher.DECRYPT_MODE, key);
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | IdentityHashMap.java | 60 * <tt>null</tt> values and the <tt>null</tt> key. This class makes no 71 * number of key-value mappings that the map is expected to hold. Internally, 76 * <p>If the size of the map (the number of key-value mappings) sufficiently 90 * associated with a key that an instance already contains is not a 172 * The number of key-value mappings contained in this identity hash map. 194 * Use NULL_KEY for key if it is null. 196 private static Object maskNull(Object key) { argument 197 return (key == null ? NULL_KEY : key); 201 * Returns internal representation of null key bac 203 unmaskNull(Object key) argument 336 get(Object key) argument 360 containsKey(Object key) argument 401 containsMapping(Object key, Object value) argument 431 put(K key, V value) argument 523 remove(Object key) argument 556 removeMapping(Object key, Object value) argument 1326 putForCreate(K key, V value) argument [all...] |
H A D | Properties.java | 42 * or loaded from a stream. Each key and its corresponding value in 47 * the property key is not found in the original property list. 56 * non-<code>String</code> key or value, the call will fail. Similarly, 59 * object that contains a non-<code>String</code> key. 103 * <!ATTLIST entry key CDATA #REQUIRED> 154 * @param key the key to be placed into this property list. 155 * @param value the value corresponding to <tt>key</tt>. 156 * @return the previous value of the specified key in this property 161 public synchronized Object setProperty(String key, Strin argument 951 getProperty(String key) argument 970 getProperty(String key, String defaultValue) argument [all...] |
/libcore/luni/src/test/java/libcore/util/ |
H A D | BasicLruCacheTest.java | 76 @Override protected void entryEvicted(String key, String value) { 77 evictionLog.add(key + "=" + value); 92 * Replacing the value for a key doesn't cause an eviction but it does bring 99 @Override protected void entryEvicted(String key, String value) { 100 evictionLog.add(key + "=" + value); 115 @Override protected void entryEvicted(String key, String value) { 116 evictionLog.add(key + "=" + value); 130 @Override protected String create(String key) { 131 return (key.length() > 1) ? ("created-" + key) [all...] |
/libcore/ojluni/src/main/java/sun/security/ssl/ |
H A D | JsseJce.java | 119 String key = (String)entry.getKey(); 120 if (key.startsWith("CertPathValidator.") 121 || key.startsWith("CertPathBuilder.") 122 || key.startsWith("CertStore.") 123 || key.startsWith("CertificateFactory.")) { 124 put(key, entry.getValue()); 147 * JCE transformation string for (3-key) Triple DES in CBC mode 354 static int getRSAKeyLength(PublicKey key) { argument 356 if (key instanceof RSAPublicKey) { 357 modulus = ((RSAPublicKey)key) 365 getRSAPublicKeySpec(PublicKey key) argument [all...] |
/libcore/ojluni/src/main/java/java/security/ |
H A D | Provider.java | 222 * Reads a property list (key and element pairs) from the input stream. 304 * Sets the <code>key</code> property to have the specified 317 * @param key the property key. 322 * (<code>key</code>), or null if it did not have one. 331 public synchronized Object put(Object key, Object value) { argument 335 key + "/" + value +"]"); 337 return implPut(key, value); 341 * Removes the <code>key</code> property (and its corresponding 355 * @param key th 367 remove(Object key) argument 376 get(Object key) argument 403 getProperty(String key) argument 481 implRemove(Object key) argument 499 implPut(Object key, Object value) argument 602 getTypeAndAlgorithm(String key) argument 1460 supportsKeyFormat(Key key) argument 1476 supportsKeyClass(Key key) argument [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
H A D | DESedeKeySpecTest.java | 99 * getKey() method testing. Checks that modification of returned key 100 * does not affect the internal key. Also test check an equality of 101 * the key with the key specified in the constructor. The object under 105 byte[] key = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 109 ks = new DESedeKeySpec(key); 116 + "in constructor.", Arrays.equals(key, res)); 118 assertFalse("The modification of returned key should not affect" 119 + "the underlying key.", key[ [all...] |
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | ConcurrentSkipListMap.java | 53 * <p>Ascending key ordered views and their iterators are faster than 147 * space by defining marker nodes not to have key/value fields, it 284 * only, returning a base-level predecessor of the key. findNode() 323 * Keys: k, key 348 /** Lazily initialized key set */ 354 /** Lazily initialized descending key set */ 388 final K key; field in class:ConcurrentSkipListMap.Node 395 Node(K key, Object value, Node<K,V> next) { argument 396 this.key = key; 634 findPredecessor(Object key, Comparator<? super K> cmp) argument 706 findNode(Object key) argument 742 doGet(Object key) argument 783 doPut(K key, V value, boolean onlyIfAbsent) argument 921 doRemove(Object key, Object value) argument 1196 findNear(K key, int rel, Comparator<? super K> cmp) argument 1231 getNear(K key, int rel) argument 1493 containsKey(Object key) argument 1511 get(Object key) argument 1526 getOrDefault(Object key, V defaultValue) argument 1544 put(K key, V value) argument 1560 remove(Object key) argument 1642 computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) argument 1666 computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) argument 1699 compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) argument 1739 merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) argument 1925 putIfAbsent(K key, V value) argument 1938 remove(Object key, Object value) argument 1951 replace(K key, V oldValue, V newValue) argument 1976 replace(K key, V value) argument 2095 lowerEntry(K key) argument 2103 lowerKey(K key) argument 2118 floorEntry(K key) argument 2127 floorKey(K key) argument 2141 ceilingEntry(K key) argument 2149 ceilingKey(K key) argument 2164 higherEntry(K key) argument 2173 higherKey(K key) argument 2580 tooLow(Object key, Comparator<? super K> cmp) argument 2586 tooHigh(Object key, Comparator<? super K> cmp) argument 2592 inBounds(Object key, Comparator<? super K> cmp) argument 2596 checkKeyBounds(K key, Comparator<? super K> cmp) argument 2730 getNearEntry(K key, int rel) argument 2754 getNearKey(K key, int rel) argument 2794 containsKey(Object key) argument 2799 get(Object key) argument 2804 put(K key, V value) argument 2809 remove(Object key) argument 2856 putIfAbsent(K key, V value) argument 2861 remove(Object key, Object value) argument 2865 replace(K key, V oldValue, V newValue) argument 2870 replace(K key, V value) argument 2964 ceilingEntry(K key) argument 2968 ceilingKey(K key) argument 2972 lowerEntry(K key) argument 2976 lowerKey(K key) argument 2980 floorEntry(K key) argument 2984 floorKey(K key) argument 2988 higherEntry(K key) argument 2992 higherKey(K key) argument [all...] |
/libcore/ojluni/src/main/java/sun/net/www/http/ |
H A D | KeepAliveCache.java | 118 KeepAliveKey key = new KeepAliveKey(url, obj); 119 ClientVector v = super.get(key); 126 super.put(key, v); 134 KeepAliveKey key = new KeepAliveKey(h.url, obj); 135 ClientVector v = super.get(key); 139 removeVector(key); 156 KeepAliveKey key = new KeepAliveKey(url, obj); 157 ClientVector v = super.get(key); 190 for (KeepAliveKey key : keySet()) { 191 ClientVector v = get(key); [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/support/ |
H A D | MyMacSpi.java | 47 protected void engineInit(Key key, AlgorithmParameterSpec params) argument 50 if (!(key instanceof SecretKeySpec)) { 51 throw new IllegalArgumentException("params is null and key is SecretKeySpec");
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
H A D | DSAPrivateKeyTest.java | 37 DSAPrivateKey key = (DSAPrivateKey) keyPair.getPrivate(); 38 assertNotNull("Invalid X value", key.getX());
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | ConcurrentSkipListMapTest.java | 84 * containsKey returns true for contained key 102 * get returns the correct element at the given key, 123 * firstKey returns first key 131 * lastKey returns last key 198 * descending iterator of key set is inverse ordered 351 * putAll adds all key-value pairs from the given map 366 * putIfAbsent works when the given key is not present 375 * putIfAbsent does not add the pair if the key is already present 383 * replace fails when the given key is not present 392 * replace succeeds if the key i 1074 put(NavigableMap<Integer, Integer> map, int key) argument 1079 remove(NavigableMap<Integer, Integer> map, int key) argument [all...] |
H A D | TreeMapTest.java | 83 * containsKey returns true for contained key 101 * get returns the correct element at the given key, 122 * firstKey returns first key 130 * lastKey returns last key 197 * descending iterator of key set is inverse ordered 334 * putAll adds all key-value pairs from the given map 349 * remove removes the correct key-value pair from the map 818 int key = rnd.nextInt(limit); 819 put(map, key); 842 int key 879 put(NavigableMap<Integer, Integer> map, int key) argument 884 remove(NavigableMap<Integer, Integer> map, int key) argument [all...] |