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

123

/system/core/include/cutils/
H A Dstr_parms.h28 void str_parms_del(struct str_parms *str_parms, const char *key);
30 int str_parms_add_str(struct str_parms *str_parms, const char *key,
32 int str_parms_add_int(struct str_parms *str_parms, const char *key, int value);
34 int str_parms_add_float(struct str_parms *str_parms, const char *key,
37 int str_parms_get_str(struct str_parms *str_parms, const char *key,
39 int str_parms_get_int(struct str_parms *str_parms, const char *key,
41 int str_parms_get_float(struct str_parms *str_parms, const char *key,
H A Dhashmap.h42 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB));
50 * Hashes the memory pointed to by key with the given size. Useful for
53 int hashmapHash(void* key, size_t keySize);
56 * Puts value for the given key in the map. Returns pre-existing value if
62 void* hashmapPut(Hashmap* map, void* key, void* value);
65 * Gets a value from the map. Returns NULL if no entry for the given key is
68 void* hashmapGet(Hashmap* map, void* key);
71 * Returns true if the map contains an entry for the given key.
73 bool hashmapContainsKey(Hashmap* map, void* key);
76 * Gets the value for a key
[all...]
H A Dsockets.h49 char key[64] = ANDROID_SOCKET_ENV_PREFIX; local
55 strlcpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1,
57 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX));
59 strncpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1,
61 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX));
62 key[sizeof(key)-1] = '\0';
65 val = getenv(key);
H A Dproperties.h45 int property_get(const char *key, char *value, const char *default_value);
49 int property_set(const char *key, const char *value);
51 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie);
60 int property_get(const char *key, char *value, const char *default_value) { argument
65 return __property_get_real(key, value, default_value);
/system/core/libmincrypt/
H A Drsa.c33 static void subM(const RSAPublicKey* key, argument
37 for (i = 0; i < key->len; ++i) {
38 A += (uint64_t)a[i] - key->n[i];
45 static int geM(const RSAPublicKey* key, argument
48 for (i = key->len; i;) {
50 if (a[i] < key->n[i]) return 0;
51 if (a[i] > key->n[i]) return 1;
57 static void montMulAdd(const RSAPublicKey* key, argument
62 uint32_t d0 = (uint32_t)A * key->n0inv;
63 uint64_t B = (uint64_t)d0 * key
82 montMul(const RSAPublicKey* key, uint32_t* c, const uint32_t* a, const uint32_t* b) argument
97 modpow(const RSAPublicKey* key, uint8_t* inout) argument
249 RSA_verify(const RSAPublicKey *key, const uint8_t *signature, const int len, const uint8_t *hash, const int hash_len) argument
[all...]
/system/core/adb/
H A Dadb_auth_client.c35 RSAPublicKey key; member in struct:adb_public_key
54 struct adb_public_key *key; local
68 key = calloc(1, sizeof(*key) + 4);
69 if (!key) {
70 D("Can't malloc key\n");
78 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key)
142 struct adb_public_key *key; local
191 adb_auth_confirm_key(unsigned char *key, size_t len, atransport *t) argument
[all...]
H A Dadb_auth.h34 int adb_auth_sign(void *key, void *token, size_t token_size, void *sig);
44 static inline int adb_auth_sign(void* key, void *token, size_t token_size, void *sig) { return 0; } argument
/system/security/keystore/include/keystore/
H A Dkeystore_get.h29 * Keys and values are 8-bit safe. The first two arguments are the key and its
33 ssize_t keystore_get(const char *key, size_t length, uint8_t** value);
/system/core/libcutils/
H A Dstr_parms.c75 const char *key; member in struct:remove_ctxt
78 static bool remove_pair(void *key, void *value, void *context) argument
84 * - if key is not supplied, then we are removing all entries,
85 * so remove key and continue (i.e. return true)
86 * - if key is supplied and matches, then remove it and don't
88 * for key.
91 if (!ctxt->key) {
94 } else if (!strcmp(ctxt->key, key)) {
102 hashmapRemove(ctxt->str_parms->map, key);
108 str_parms_del(struct str_parms *str_parms, const char *key) argument
150 char *key; local
192 str_parms_add_str(struct str_parms *str_parms, const char *key, const char *value) argument
214 str_parms_add_int(struct str_parms *str_parms, const char *key, int value) argument
227 str_parms_add_float(struct str_parms *str_parms, const char *key, float value) argument
241 str_parms_get_str(struct str_parms *str_parms, const char *key, char *val, int len) argument
253 str_parms_get_int(struct str_parms *str_parms, const char *key, int *val) argument
269 str_parms_get_float(struct str_parms *str_parms, const char *key, float *val) argument
287 combine_strings(void *key, void *value, void *context) argument
321 dump_entry(void *key, void *value, void *context) argument
[all...]
H A Dhashmap.c28 void* key; member in struct:Entry
37 int (*hash)(void* key);
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) {
78 * Hashes the given key.
80 static inline int hashKey(Hashmap* map, void* key) { argument
81 int h = map->hash(key);
155 int hashmapHash(void* key, size_t keySize) { argument
157 char* data = (char*) key;
166 static Entry* createEntry(void* key, int hash, void* value) { argument
171 entry->key
43 hashmapCreate(size_t initialCapacity, int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) argument
189 hashmapPut(Hashmap* map, void* key, void* value) argument
221 hashmapGet(Hashmap* map, void* key) argument
236 hashmapContainsKey(Hashmap* map, void* key) argument
251 hashmapMemoize(Hashmap* map, void* key, void* (*initialValue)(void* key, void* context), void* context) argument
284 hashmapRemove(Hashmap* map, void* key) argument
306 hashmapForEach(Hashmap* map, bool (*callback)(void* key, void* value, void* context), void* context) argument
342 hashmapIntHash(void* key) argument
[all...]
H A Dproperties.c34 int property_set(const char *key, const char *value) argument
36 return __system_property_set(key, value);
39 int property_get(const char *key, char *value, const char *default_value) argument
43 len = __system_property_get(key, value);
57 void (*propfn)(const char *key, const char *value, void *cookie);
72 void (*propfn)(const char *key, const char *value, void *cookie),
146 int property_get(const char *key, char *value, const char *default_value) argument
152 //ALOGV("PROPERTY GET [%s]\n", key);
164 if (strlen(key) >= PROPERTY_KEY_MAX) return -1;
169 strcpy(sendBuf+1, key);
71 property_list( void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) argument
213 property_set(const char *key, const char *value) argument
250 property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) argument
269 property_get(const char *key, char *value, const char *default_value) argument
303 property_set(const char *key, const char *value) argument
333 property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) argument
[all...]
/system/core/include/utils/
H A DPropertyMap.h28 * Provides a mechanism for passing around string-based property key / value pairs
34 * key = value
37 * The '=' separates the key from the value.
38 * The key and value may not contain whitespace.
58 * Replaces the property with the same key if it is already present.
60 void addProperty(const String8& key, const String8& value);
62 /* Returns true if the property map contains the specified key. */
63 bool hasProperty(const String8& key) const;
66 * Returns true and sets outValue if the key was found and its value was parsed successfully.
69 bool tryGetProperty(const String8& key, String
[all...]
H A DLruCache.h32 virtual void operator()(EntryKey& key, EntryValue& value) = 0;
46 const TValue& get(const TKey& key);
47 bool put(const TKey& key, const TValue& value);
48 bool remove(const TKey& key);
70 const TKey& key() const { function in class:android::LruCache::Iterator
71 return mCache.mTable->entryAt(mIndex).key;
82 TKey key; member in struct:android::LruCache::Entry
87 Entry(TKey key_, TValue value_) : key(key_), value(value_), parent(NULL), child(NULL) {
89 const TKey& getKey() const { return key; }
122 const TValue& LruCache<TKey, TValue>::get(const TKey& key) { argument
135 put(const TKey& key, const TValue& value) argument
158 remove(const TKey& key) argument
[all...]
H A DKeyedVector.h68 const VALUE& valueFor(const KEY& key) const;
71 ssize_t indexOfKey(const KEY& key) const;
78 VALUE& editValueFor(const KEY& key);
85 ssize_t add(const KEY& key, const VALUE& item);
86 ssize_t replaceValueFor(const KEY& key, const VALUE& item);
93 ssize_t removeItem(const KEY& key);
111 * valueFor() is called with a key that doesn't exist.
118 const VALUE& valueFor(const KEY& key) const;
137 ssize_t KeyedVector<KEY,VALUE>::indexOfKey(const KEY& key) const {
138 return mVector.indexOf( key_value_pair_t<KEY,VALUE>(key) );
[all...]
/system/core/libpixelflinger/codeflinger/tinyutils/
H A DKeyedVector.h64 const VALUE& valueFor(const KEY& key) const;
67 ssize_t indexOfKey(const KEY& key) const;
73 VALUE& editValueFor(const KEY& key);
80 ssize_t add(const KEY& key, const VALUE& item);
81 ssize_t replaceValueFor(const KEY& key, const VALUE& item);
88 ssize_t removeItem(const KEY& key);
99 * valueFor() is called with a key that doesn't exist.
106 const VALUE& valueFor(const KEY& key) const;
120 ssize_t KeyedVector<KEY,VALUE>::indexOfKey(const KEY& key) const {
121 return mVector.indexOf( key_value_pair_t<KEY,VALUE>(key) );
142 editValueFor(const KEY& key) argument
154 add(const KEY& key, const VALUE& value) argument
159 replaceValueFor(const KEY& key, const VALUE& value) argument
175 removeItem(const KEY& key) argument
[all...]
/system/core/libutils/
H A DPropertyMap.cpp50 void PropertyMap::addProperty(const String8& key, const String8& value) { argument
51 mProperties.add(key, value);
54 bool PropertyMap::hasProperty(const String8& key) const {
55 return mProperties.indexOfKey(key) >= 0;
58 bool PropertyMap::tryGetProperty(const String8& key, String8& outValue) const { argument
59 ssize_t index = mProperties.indexOfKey(key);
68 bool PropertyMap::tryGetProperty(const String8& key, bool& outValue) const { argument
70 if (!tryGetProperty(key, intValue)) {
78 bool PropertyMap::tryGetProperty(const String8& key, int32_t& outValue) const { argument
80 if (! tryGetProperty(key, stringValu
95 tryGetProperty(const String8& key, float& outValue) const argument
[all...]
/system/core/toolbox/
H A Dwatchprops.c14 static int str_hash(void *key) argument
16 return hashmapHash(key, strlen(key));
38 char *key = strdup(name); local
40 if (!key || !value)
44 hashmapPut(watchlist, key, value);
H A Dreadtty.c11 char key; member in struct:__anon255
26 char next_char(char key, char current) argument
31 if(key == map[i].key) {
38 return key;
41 char prev_char(char key, char current) argument
46 if(key == map[i].key) {
53 return key;
/system/security/keystore/
H A Dkeystore_get.cpp24 ssize_t keystore_get(const char *key, size_t keyLength, uint8_t** value) { argument
34 int32_t ret = service->get(String16(key, keyLength), value, &valueLength);
/system/core/fs_mgr/
H A Dfs_mgr_verity.c53 RSAPublicKey *key; local
55 key = malloc(sizeof(RSAPublicKey));
56 if (!key) {
57 ERROR("Can't malloc key\n");
64 free(key);
68 if (!fread(key, sizeof(*key), 1, f)) {
69 ERROR("Could not read key!");
71 free(key);
75 if (key
89 RSAPublicKey *key; local
[all...]
/system/core/include/mincrypt/
H A Drsa.h37 #define RSANUMBYTES 256 /* 2048 bit key length */
48 int RSA_verify(const RSAPublicKey *key,
/system/core/fastbootd/
H A Dconfig.c64 char *key; local
78 key = line;
82 key = strip(key);
85 key = strdup(key);
88 fastboot_publish(key, value);
/system/core/libpixelflinger/codeflinger/
H A DCodeCache.h38 virtual int compare_type(const AssemblyKeyBase& key) const = 0;
46 virtual int compare_type(const AssemblyKeyBase& key) const {
47 const T& rhs = static_cast<const AssemblyKey&>(key).mKey;
86 sp<Assembly> lookup(const AssemblyKeyBase& key) const;
88 int cache( const AssemblyKeyBase& key,
128 return lhs.key.mKey->compare_type(*(rhs.key.mKey));
/system/core/libmincrypt/tools/
H A DDumpPublicKey.java35 * @param key to perform sanity checks on
36 * @return version number of key. Supported versions are:
37 * 1: 2048-bit RSA key with e=3 and SHA-1 hash
38 * 2: 2048-bit RSA key with e=65537 and SHA-1 hash
39 * 3: 2048-bit RSA key with e=3 and SHA-256 hash
40 * 4: 2048-bit RSA key with e=65537 and SHA-256 hash
41 * @throws Exception if the key has the wrong size or public exponent
44 static int check(RSAPublicKey key, boolean useSHA256) throws Exception { argument
45 BigInteger pubexp = key.getPublicExponent();
46 BigInteger modulus = key
72 print(RSAPublicKey key, boolean useSHA256) argument
[all...]
/system/core/fastboot/
H A Dgenkey.sh9 # Generate a 2048 bit RSA key with public exponent 3.
10 # Encrypt private key with provided password.
13 # Create a self-signed cert for this key.
14 openssl req -new -x509 -key $1.pem -passin pass:"$2" \
18 # Create a PKCS12 store containing the generated private key.
19 # Protect the keystore and the private key with the provided password.

Completed in 1738 milliseconds

123