Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 82) sorted by relevance

1234

/system/core/libmincrypt/
Drsa.c33 static void subM(const RSAPublicKey* key, in subM() argument
37 for (i = 0; i < key->len; ++i) { in subM()
38 A += (uint64_t)a[i] - key->n[i]; in subM()
45 static int geM(const RSAPublicKey* key, in geM() argument
48 for (i = key->len; i;) { in geM()
50 if (a[i] < key->n[i]) return 0; in geM()
51 if (a[i] > key->n[i]) return 1; in geM()
57 static void montMulAdd(const RSAPublicKey* key, in montMulAdd() argument
62 uint32_t d0 = (uint32_t)A * key->n0inv; in montMulAdd()
63 uint64_t B = (uint64_t)d0 * key->n[0] + (uint32_t)A; in montMulAdd()
[all …]
/system/core/libcutils/
Dstr_parms.c76 const char *key; member
79 static bool remove_pair(void *key, void *value, void *context) in remove_pair() argument
92 if (!ctxt->key) { in remove_pair()
95 } else if (!strcmp(ctxt->key, key)) { in remove_pair()
103 hashmapRemove(ctxt->str_parms->map, key); in remove_pair()
104 free(key); in remove_pair()
109 void str_parms_del(struct str_parms *str_parms, const char *key) in str_parms_del() argument
113 .key = key, in str_parms_del()
151 char *key; in str_parms_create_str() local
158 key = strndup(kvpair, eq - kvpair); in str_parms_create_str()
[all …]
Dhashmap.c28 void* key; member
37 int (*hash)(void* key);
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) { in hashmapCreate() argument
80 static inline int hashKey(Hashmap* map, void* key) { in hashKey() argument
81 int h = map->hash(key); in hashKey()
155 int hashmapHash(void* key, size_t keySize) { in hashmapHash() argument
157 char* data = (char*) key; in hashmapHash()
166 static Entry* createEntry(void* key, int hash, void* value) { in createEntry() argument
171 entry->key = key; in createEntry()
189 void* hashmapPut(Hashmap* map, void* key, void* value) { in hashmapPut() argument
[all …]
Dproperties.c33 int8_t property_get_bool(const char *key, int8_t default_value) { in property_get_bool() argument
34 if (!key) { in property_get_bool()
41 int len = property_get(key, buf, ""); in property_get_bool()
61 static intmax_t property_get_imax(const char *key, intmax_t lower_bound, intmax_t upper_bound, in property_get_imax() argument
63 if (!key) { in property_get_imax()
71 int len = property_get(key, buf, ""); in property_get_imax()
81 ALOGV("%s(%s,%" PRIdMAX ") - overflow", __FUNCTION__, key, default_value); in property_get_imax()
85 ALOGV("%s(%s,%" PRIdMAX ") - out of range", __FUNCTION__, key, default_value); in property_get_imax()
90 __FUNCTION__, key, default_value); in property_get_imax()
99 int64_t property_get_int64(const char *key, int64_t default_value) { in property_get_int64() argument
[all …]
/system/core/adb/
Dadb_auth_client.c35 RSAPublicKey key; member
54 struct adb_public_key *key; in read_keys() local
68 key = calloc(1, sizeof(*key) + 4); in read_keys()
69 if (!key) { in read_keys()
78 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4); in read_keys()
79 if (ret != sizeof(key->key)) { in read_keys()
81 free(key); in read_keys()
85 if (key->key.len != RSANUMWORDS) { in read_keys()
86 D("%s: Invalid key len %d\n", file, key->key.len); in read_keys()
87 free(key); in read_keys()
[all …]
/system/core/libmincrypt/tools/
DDumpPublicKey.java48 static int checkRSA(RSAPublicKey key, boolean useSHA256) throws Exception { in checkRSA() argument
49 BigInteger pubexp = key.getPublicExponent(); in checkRSA()
50 BigInteger modulus = key.getModulus(); in checkRSA()
76 static int checkEC(ECPublicKey key) throws Exception { in checkEC() argument
77 if (key.getParams().getCurve().getField().getFieldSize() != 256) { in checkEC()
87 static int check(PublicKey key, boolean useSHA256) throws Exception { in check() argument
88 if (key instanceof RSAPublicKey) { in check()
89 return checkRSA((RSAPublicKey) key, useSHA256); in check()
90 } else if (key instanceof ECPublicKey) { in check()
94 return checkEC((ECPublicKey) key); in check()
[all …]
/system/core/include/cutils/
Dhashmap.h42 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB));
53 int hashmapHash(void* key, size_t keySize);
62 void* hashmapPut(Hashmap* map, void* key, void* value);
68 void* hashmapGet(Hashmap* map, void* key);
73 bool hashmapContainsKey(Hashmap* map, void* key);
82 void* hashmapMemoize(Hashmap* map, void* key,
83 void* (*initialValue)(void* key, void* context), void* context);
89 void* hashmapRemove(Hashmap* map, void* key);
101 bool (*callback)(void* key, void* value, void* context),
125 int hashmapIntHash(void* key);
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,
38 int str_parms_has_key(struct str_parms *str_parms, const char *key);
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,
47 int str_parms_get_float(struct str_parms *str_parms, const char *key,
Dproperties.h46 int property_get(const char *key, char *value, const char *default_value);
62 int8_t property_get_bool(const char *key, int8_t default_value);
83 int64_t property_get_int64(const char *key, int64_t default_value);
104 int32_t property_get_int32(const char *key, int32_t default_value);
108 int property_set(const char *key, const char *value);
110 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); …
119 int property_get(const char *key, char *value, const char *default_value) { in property_get() argument
124 return __property_get_real(key, value, default_value); in property_get()
Dsockets.h49 char key[64] = ANDROID_SOCKET_ENV_PREFIX; in android_get_control_socket() local
55 strlcpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1, in android_get_control_socket()
57 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX)); in android_get_control_socket()
59 strncpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1, in android_get_control_socket()
61 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX)); in android_get_control_socket()
62 key[sizeof(key)-1] = '\0'; in android_get_control_socket()
65 val = getenv(key); in android_get_control_socket()
/system/core/libpixelflinger/codeflinger/tinyutils/
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);
106 const VALUE& valueFor(const KEY& key) const;
120 ssize_t KeyedVector<KEY,VALUE>::indexOfKey(const KEY& key) const { in indexOfKey() argument
121 return mVector.indexOf( key_value_pair_t<KEY,VALUE>(key) ); in indexOfKey()
125 const VALUE& KeyedVector<KEY,VALUE>::valueFor(const KEY& key) const { in valueFor() argument
[all …]
/system/core/include/utils/
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);
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) );
142 const VALUE& KeyedVector<KEY,VALUE>::valueFor(const KEY& key) const {
[all …]
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);
71 const TKey& key() const { in key() function
72 return mCache.mTable->entryAt(mIndex).key; in key()
83 TKey key; member
88 Entry(TKey key_, TValue value_) : key(key_), value(value_), parent(NULL), child(NULL) { in Entry()
90 const TKey& getKey() const { return key; } in getKey()
127 const TValue& LruCache<TKey, TValue>::get(const TKey& key) { in get() argument
[all …]
DPropertyMap.h60 void addProperty(const String8& key, const String8& value);
63 bool hasProperty(const String8& key) const;
69 bool tryGetProperty(const String8& key, String8& outValue) const;
70 bool tryGetProperty(const String8& key, bool& outValue) const;
71 bool tryGetProperty(const String8& key, int32_t& outValue) const;
72 bool tryGetProperty(const String8& key, float& outValue) const;
/system/core/fs_mgr/
Dfs_mgr_verity.c54 RSAPublicKey *key; in load_key() local
56 key = malloc(sizeof(RSAPublicKey)); in load_key()
57 if (!key) { in load_key()
65 free(key); in load_key()
69 if (!fread(key, sizeof(*key), 1, f)) { in load_key()
72 free(key); in load_key()
76 if (key->len != RSANUMWORDS) { in load_key()
77 ERROR("Invalid key length %d\n", key->len); in load_key()
79 free(key); in load_key()
84 return key; in load_key()
[all …]
/system/core/libutils/
DPropertyMap.cpp50 void PropertyMap::addProperty(const String8& key, const String8& value) { in addProperty() argument
51 mProperties.add(key, value); in addProperty()
54 bool PropertyMap::hasProperty(const String8& key) const { in hasProperty()
55 return mProperties.indexOfKey(key) >= 0; in hasProperty()
58 bool PropertyMap::tryGetProperty(const String8& key, String8& outValue) const { in tryGetProperty() argument
59 ssize_t index = mProperties.indexOfKey(key); in tryGetProperty()
68 bool PropertyMap::tryGetProperty(const String8& key, bool& outValue) const { in tryGetProperty() argument
70 if (!tryGetProperty(key, intValue)) { in tryGetProperty()
78 bool PropertyMap::tryGetProperty(const String8& key, int32_t& outValue) const { in tryGetProperty() argument
80 if (! tryGetProperty(key, stringValue) || stringValue.length() == 0) { in tryGetProperty()
[all …]
/system/core/fastbootd/
Dconfig.c48 char *key; in config_parse_line() local
62 key = line; in config_parse_line()
66 key = strip(key); in config_parse_line()
69 key = strdup(key); in config_parse_line()
72 fastboot_publish(key, value); in config_parse_line()
/system/core/toolbox/
Dreadtty.c11 char key; member
26 char next_char(char key, char current) in next_char() argument
31 if(key == map[i].key) { in next_char()
38 return key; in next_char()
41 char prev_char(char key, char current) in prev_char() argument
46 if(key == map[i].key) { in prev_char()
53 return key; in prev_char()
Dwatchprops.c12 static int str_hash(void *key) in str_hash() argument
14 return hashmapHash(key, strlen(key)); in str_hash()
36 char *key = strdup(name); in add_to_watchlist() local
38 if (!key || !value) in add_to_watchlist()
42 hashmapPut(watchlist, key, value); in add_to_watchlist()
/system/keymaster/
Decdsa_operation.h33 keymaster_padding_t padding, EC_KEY* key) in EcdsaOperation() argument
34 : Operation(purpose, logger), ecdsa_key_(key), digest_(digest), padding_(padding) {} in EcdsaOperation()
53 keymaster_padding_t padding, EC_KEY* key) in EcdsaSignOperation() argument
54 : EcdsaOperation(purpose, logger, digest, padding, key) {} in EcdsaSignOperation()
61 keymaster_digest_t digest, keymaster_padding_t padding, EC_KEY* key) in EcdsaVerifyOperation() argument
62 : EcdsaOperation(purpose, logger, digest, padding, key) {} in EcdsaVerifyOperation()
Drsa_operation.h31 keymaster_padding_t padding, RSA* key) in RsaOperation() argument
32 : Operation(purpose, logger), rsa_key_(key), digest_(digest), padding_(padding) {} in RsaOperation()
51 keymaster_padding_t padding, RSA* key) in RsaSignOperation() argument
52 : RsaOperation(purpose, logger, digest, padding, key) {} in RsaSignOperation()
59 keymaster_padding_t padding, RSA* key) in RsaVerifyOperation() argument
60 : RsaOperation(purpose, logger, digest, padding, key) {} in RsaVerifyOperation()
Ddsa_operation.h33 keymaster_padding_t padding, DSA* key) in DsaOperation() argument
34 : Operation(purpose, logger), dsa_key_(key), digest_(digest), padding_(padding) {} in DsaOperation()
53 keymaster_padding_t padding, DSA* key) in DsaSignOperation() argument
54 : DsaOperation(purpose, logger, digest, padding, key) {} in DsaSignOperation()
61 keymaster_padding_t padding, DSA* key) in DsaVerifyOperation() argument
62 : DsaOperation(purpose, logger, digest, padding, key) {} in DsaVerifyOperation()
/system/core/init/
Dproperty_service.c366 char *key, *value, *eol, *sol, *tmp, *fn; in load_properties() local
375 key = sol; in load_properties()
379 while (isspace(*key)) key++; in load_properties()
380 if (*key == '#') continue; in load_properties()
383 while ((tmp > key) && isspace(*tmp)) *tmp-- = 0; in load_properties()
385 if (!strncmp(key, "import ", 7) && flen == 0) { in load_properties()
386 fn = key + 7; in load_properties()
389 key = strchr(fn, ' '); in load_properties()
390 if (key) { in load_properties()
391 *key++ = 0; in load_properties()
[all …]
/system/core/libpixelflinger/codeflinger/
DCodeCache.h38 virtual int compare_type(const AssemblyKeyBase& key) const = 0;
46 virtual int compare_type(const AssemblyKeyBase& key) const { in compare_type() argument
47 const T& rhs = static_cast<const AssemblyKey&>(key).mKey; in compare_type()
86 sp<Assembly> lookup(const AssemblyKeyBase& key) const;
88 int cache( const AssemblyKeyBase& key,
128 return lhs.key.mKey->compare_type(*(rhs.key.mKey)); in compare_type()
/system/core/libutils/tests/
DBasicHashtable_test.cpp123 const TKey& key, const TValue& value) { in add() argument
124 return h.add(hash_type(key), key_value_pair_t<TKey, TValue>(key, value)); in add()
129 ssize_t index, const TKey& key) { in find() argument
130 return h.find(index, hash_type(key), key); in find()
135 const TKey& key) { in remove() argument
136 ssize_t index = find(h, -1, key); in remove()
145 static void getKeyValue(const TEntry& entry, int* key, int* value);
147 template <> void getKeyValue(const SimpleEntry& entry, int* key, int* value) { in getKeyValue() argument
148 *key = entry.key; in getKeyValue()
152 template <> void getKeyValue(const ComplexEntry& entry, int* key, int* value) { in getKeyValue() argument
[all …]

1234