/system/core/include/cutils/ |
H A D | properties.h | 46 int property_get(const char *key, char *value, const char *default_value); 48 /* property_get_bool: returns the value of key coerced into a 59 ** If no property with this key is set (or the key is NULL) or the boolean 62 int8_t property_get_bool(const char *key, int8_t default_value); 64 /* property_get_int64: returns the value of key truncated and coerced into a 80 ** If no property with this key is set (or the key is NULL) or the numeric 83 int64_t property_get_int64(const char *key, int64_t default_value); 85 /* property_get_int32: returns the value of key truncate 119 property_get(const char *key, char *value, const char *default_value) argument [all...] |
H A D | str_parms.h | 28 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 // Returns non-zero if the str_parms contains the specified key. 38 int str_parms_has_key(struct str_parms *str_parms, const char *key); 40 // Gets value associated with the specified key (if present), placing it in the buffer 42 // If 'key' isn't in the parms, then return -ENOENT (-2) and leave 'out_val' untouched. 43 int str_parms_get_str(struct str_parms *str_parms, const char *key, 45 int str_parms_get_int(struct str_parms *str_parms, const char *key, [all...] |
H A D | hashmap.h | 42 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 D | sockets.h | 49 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);
|
/system/core/libmincrypt/ |
H A D | rsa.c | 33 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 D | adb_auth_client.c | 35 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...] |
/system/security/keystore/include/keystore/ |
H A D | keystore_get.h | 29 * 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 D | str_parms.c | 76 const char *key; member in struct:remove_ctxt 79 static bool remove_pair(void *key, void *value, void *context) argument 85 * - if key is not supplied, then we are removing all entries, 86 * so remove key and continue (i.e. return true) 87 * - if key is supplied and matches, then remove it and don't 89 * for key. 92 if (!ctxt->key) { 95 } else if (!strcmp(ctxt->key, key)) { 103 hashmapRemove(ctxt->str_parms->map, key); 109 str_parms_del(struct str_parms *str_parms, const char *key) argument 151 char *key; local 193 str_parms_add_str(struct str_parms *str_parms, const char *key, const char *value) argument 238 str_parms_add_int(struct str_parms *str_parms, const char *key, int value) argument 251 str_parms_add_float(struct str_parms *str_parms, const char *key, float value) argument 265 str_parms_has_key(struct str_parms *str_parms, const char *key) argument 269 str_parms_get_str(struct str_parms *str_parms, const char *key, char *val, int len) argument 281 str_parms_get_int(struct str_parms *str_parms, const char *key, int *val) argument 297 str_parms_get_float(struct str_parms *str_parms, const char *key, float *val) argument 316 combine_strings(void *key, void *value, void *context) argument 350 dump_entry(void *key, void *value, void *context UNUSED) argument [all...] |
H A D | hashmap.c | 28 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 D | properties.c | 33 int8_t property_get_bool(const char *key, int8_t default_value) { argument 34 if (!key) { 41 int len = property_get(key, buf, ""); 61 static intmax_t property_get_imax(const char *key, intmax_t lower_bound, intmax_t upper_bound, argument 63 if (!key) { 71 int len = property_get(key, buf, ""); 81 ALOGV("%s(%s,%" PRIdMAX ") - overflow", __FUNCTION__, key, default_value); 85 ALOGV("%s(%s,%" PRIdMAX ") - out of range", __FUNCTION__, key, default_value); 90 __FUNCTION__, key, default_value); 99 int64_t property_get_int64(const char *key, int64_ argument 103 property_get_int32(const char *key, int32_t default_value) argument 112 property_set(const char *key, const char *value) argument 117 property_get(const char *key, char *value, const char *default_value) argument 152 property_list( void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) argument 227 property_get(const char *key, char *value, const char *default_value) argument 294 property_set(const char *key, const char *value) argument 331 property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) argument 350 property_get(const char *key, char *value, const char *default_value) argument 384 property_set(const char *key, const char *value) argument 414 property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) argument [all...] |
/system/core/libmincrypt/tools/ |
H A D | DumpPublicKey.java | 40 * @param key to perform sanity checks on 41 * @return version number of key. Supported versions are: 42 * 1: 2048-bit RSA key with e=3 and SHA-1 hash 43 * 2: 2048-bit RSA key with e=65537 and SHA-1 hash 44 * 3: 2048-bit RSA key with e=3 and SHA-256 hash 45 * 4: 2048-bit RSA key with e=65537 and SHA-256 hash 46 * @throws Exception if the key has the wrong size or public exponent 48 static int checkRSA(RSAPublicKey key, boolean useSHA256) throws Exception { argument 49 BigInteger pubexp = key.getPublicExponent(); 50 BigInteger modulus = key 76 checkEC(ECPublicKey key) argument 87 check(PublicKey key, boolean useSHA256) argument 106 printRSA(RSAPublicKey key, boolean useSHA256) argument 171 printEC(ECPublicKey key) argument 221 print(PublicKey key, boolean useSHA256) argument [all...] |
/system/core/include/utils/ |
H A D | PropertyMap.h | 28 * 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 D | LruCache.h | 32 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); 71 const TKey& key() const { function in class:android::LruCache::Iterator 72 return mCache.mTable->entryAt(mIndex).key; 83 TKey key; member in struct:android::LruCache::Entry 88 Entry(TKey key_, TValue value_) : key(key_), value(value_), parent(NULL), child(NULL) { 90 const TKey& getKey() const { return key; } 127 const TValue& LruCache<TKey, TValue>::get(const TKey& key) { argument 140 put(const TKey& key, const TValue& value) argument 163 remove(const TKey& key) argument [all...] |
H A D | KeyedVector.h | 68 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/keymaster/ |
H A D | dsa_operation.h | 33 keymaster_padding_t padding, DSA* key) 34 : Operation(purpose, logger), dsa_key_(key), digest_(digest), padding_(padding) {} 53 keymaster_padding_t padding, DSA* key) 54 : DsaOperation(purpose, logger, digest, padding, key) {} 61 keymaster_padding_t padding, DSA* key) 62 : DsaOperation(purpose, logger, digest, padding, key) {} 32 DsaOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, DSA* key) argument 52 DsaSignOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, DSA* key) argument 60 DsaVerifyOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, DSA* key) argument
|
H A D | ecdsa_operation.h | 33 keymaster_padding_t padding, EC_KEY* key) 34 : Operation(purpose, logger), ecdsa_key_(key), digest_(digest), padding_(padding) {} 53 keymaster_padding_t padding, EC_KEY* key) 54 : EcdsaOperation(purpose, logger, digest, padding, key) {} 61 keymaster_digest_t digest, keymaster_padding_t padding, EC_KEY* key) 62 : EcdsaOperation(purpose, logger, digest, padding, key) {} 32 EcdsaOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, EC_KEY* key) argument 52 EcdsaSignOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, EC_KEY* key) argument 60 EcdsaVerifyOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, EC_KEY* key) argument
|
H A D | rsa_operation.h | 31 keymaster_padding_t padding, RSA* key) 32 : Operation(purpose, logger), rsa_key_(key), digest_(digest), padding_(padding) {} 51 keymaster_padding_t padding, RSA* key) 52 : RsaOperation(purpose, logger, digest, padding, key) {} 59 keymaster_padding_t padding, RSA* key) 60 : RsaOperation(purpose, logger, digest, padding, key) {} 30 RsaOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, RSA* key) argument 50 RsaSignOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, RSA* key) argument 58 RsaVerifyOperation(keymaster_purpose_t purpose, const Logger& logger, keymaster_digest_t digest, keymaster_padding_t padding, RSA* key) argument
|
/system/core/libpixelflinger/codeflinger/tinyutils/ |
H A D | KeyedVector.h | 64 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 D | PropertyMap.cpp | 50 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/fastbootd/ |
H A D | config.c | 48 char *key; local 62 key = line; 66 key = strip(key); 69 key = strdup(key); 72 fastboot_publish(key, value);
|
/system/core/toolbox/ |
H A D | watchprops.c | 12 static int str_hash(void *key) argument 14 return hashmapHash(key, strlen(key)); 36 char *key = strdup(name); local 38 if (!key || !value) 42 hashmapPut(watchlist, key, value);
|
/system/security/keystore/ |
H A D | keystore_get.cpp | 24 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 D | fs_mgr_verity.c | 53 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 88 RSAPublicKey *key; local 359 char *key; local [all...] |
/system/core/include/mincrypt/ |
H A D | rsa.h | 37 #define RSANUMBYTES 256 /* 2048 bit key length */ 48 int RSA_verify(const RSAPublicKey *key,
|
/system/core/libpixelflinger/codeflinger/ |
H A D | CodeCache.h | 38 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));
|