/system/security/keystore/ |
H A D | keystore.cpp | 53 /* KeyStore is a secured storage for key-value pairs. In this implementation, 54 * each file stores one key-value pair. Keys are encoded in file names, and 55 * values are encrypted with checksums. The encryption key is protected by a 161 * [0-o]. Therefore in the worst case the length of a key gets doubled. Note 164 static int encode_key(char* out, const Value* key) { argument 165 const uint8_t* in = key->value; 166 int length = key->length; 180 static int encode_key_for_uid(char* out, uid_t uid, const Value* key) { argument 184 return n + encode_key(out, key); 503 // the AES key, the 650 importKey(const Value* key, const char* filename) argument 729 generateKeyFromPassword(uint8_t* key, ssize_t keySize, Value* pw, uint8_t* salt) argument 1094 import(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* key, Value*) argument [all...] |
H A D | keystore_get.h | 36 * The first two arguments are the key and its length. The third argument 40 static int keystore_get(const char *key, int length, char *value) argument 55 send(sock, key, length, 0) == length && shutdown(sock, SHUT_WR) == 0 &&
|
/system/security/softkeymaster/ |
H A D | keymaster_openssl.cpp | 101 ALOGE("private or public key size was too big"); 105 /* int type + int size + private key data + int size + public key data */ 111 ALOGE("could not allocate memory for key blob"); 119 /* Write key type to allocated buffer */ 124 /* Write public key to allocated buffer */ 133 /* Write private key to allocated buffer */ 154 ALOGE("supplied key blob was NULL"); 162 ALOGE("key blob appears to be truncated"); 167 ALOGE("cannot read key; i 268 openssl_import_keypair(const keymaster_device_t* dev, const uint8_t* key, const size_t key_length, uint8_t** key_blob, size_t* key_blob_length) argument [all...] |
/system/vold/ |
H A D | Devmapper.cpp | 166 int Devmapper::create(const char *name, const char *loopFile, const char *key, argument 236 "twofish %s 0 %s 0", key, loopFile);
|
H A D | Devmapper.h | 27 static int create(const char *name, const char *loopFile, const char *key,
|
H A D | VolumeManager.cpp | 241 const char *key, const int ownerUid, bool isExternal) { 326 if (strcmp(key, "none")) { 329 if (Devmapper::create(idHash, loopDevice, key, numImgSectors, dmDevice, 861 int VolumeManager::mountAsec(const char *id, const char *key, int ownerUid) { argument 920 if (strcmp(key, "none")) { 922 if (Devmapper::create(idHash, loopDevice, key, nr_sec, 1004 int VolumeManager::mountObb(const char *img, const char *key, int ownerGid) { argument 1056 if (strcmp(key, "none")) { 1058 if (Devmapper::create(idHash, loopDevice, key, nr_sec, 240 createAsec(const char *id, unsigned int numSectors, const char *fstype, const char *key, const int ownerUid, bool isExternal) argument
|
H A D | VolumeManager.h | 93 const char *key, const int ownerUid, bool isExternal); 108 int mountAsec(const char *id, const char *key, int ownerUid); 116 int mountObb(const char *fileName, const char *key, int ownerUid);
|
H A D | cryptfs.c | 18 * 1. Perhaps keep several copies of the encrypted key, in case something 142 /* key or salt can be NULL, in which case just skip writing that value. Useful to 143 * update the failed mount count but not change the key. 146 unsigned char *key, unsigned char *salt) 171 * encryption info footer and key, and plenty of bytes to spare for future 187 SLOGE("Unexpected value for crypto key location\n"); 196 if (key) { 203 if ( (cnt = write(fd, key, crypt_ftr->keysize)) != crypt_ftr->keysize) { 204 SLOGE("Cannot write key for real block device %s\n", fname); 212 if (! key) 145 put_crypt_ftr_and_key(char *real_blk_name, struct crypt_mnt_ftr *crypt_ftr, unsigned char *key, unsigned char *salt) argument 244 get_crypt_ftr_and_key(char *real_blk_name, struct crypt_mnt_ftr *crypt_ftr, unsigned char *key, unsigned char *salt) argument 886 unsigned char key[32], salt[32]; local [all...] |
/system/bluetooth/bluez-clean-headers/bluetooth/ |
H A D | hci.h | 561 uint8_t key[32]; member in struct:__anon34 1662 uint8_t key[16]; member in struct:__anon167 1687 uint8_t key[16]; member in struct:__anon170 1695 uint8_t key[16]; member in struct:__anon171
|
/system/core/adb/ |
H A D | adb.c | 353 ret = adb_auth_sign(t->key, token, token_size, p->data); 374 D("Failed to get user public key\n"); 443 char *key; local 444 key = adb_strtok_r(cp + 1, prop_seps, &save); 445 while (key) { 446 cp = strchr(key, key_val_sep); 449 if (!strcmp(key, "ro.product.name")) 451 else if (!strcmp(key, "ro.product.model")) 453 else if (!strcmp(key, "ro.product.device")) 456 key [all...] |
H A D | adb.h | 206 void *key; member in struct:atransport
|
H A D | adb_auth.h | 32 int adb_auth_sign(void *key, void *token, size_t token_size, void *sig); 43 static inline int adb_auth_sign(void* key, void *token, size_t token_size, void *sig) { return 0; } argument
|
H A D | adb_auth_client.c | 34 RSAPublicKey key; member in struct:adb_public_key 51 struct adb_public_key *key; local 65 key = calloc(1, sizeof(*key) + 4); 66 if (!key) { 67 D("Can't malloc key\n"); 75 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) 139 struct adb_public_key *key; local 175 adb_auth_confirm_key(unsigned char *key, size_t len, atransport *t) argument [all...] |
H A D | adb_auth_host.c | 62 /* Convert OpenSSL RSA private key to android pre-computed RSAPublicKey format */ 155 D("Writing public key to '%s'\n", path); 186 D("Failed to allocate key\n"); 206 D("Failed to write key\n"); 211 D("Failed to write public key\n"); 228 struct adb_private_key *key; local 239 key = malloc(sizeof(*key)); 240 if (!key) { 241 D("Failed to alloc key\ 349 struct adb_private_key *key = node_to_item(node, struct adb_private_key, node); local [all...] |
/system/core/charger/ |
H A D | charger.c | 772 * of time the key spent not being pressed is not useful */ 778 LOGV("[%lld] key[%d] down\n", now, code); 783 LOGV("[%lld] key[%d] up (was down for %lld.%lldsec)\n", now, 799 struct key_state *key, 802 int64_t then = key->timestamp + timeout; 810 struct key_state *key = &charger->keys[code]; local 814 if (key->down) { 815 int64_t reboot_timeout = key->timestamp + POWER_ON_KEY_TIME; 820 /* if the key is pressed but timeout hasn't expired, 823 set_next_key_check(charger, key, POWER_ON_KEY_TIM 798 set_next_key_check(struct charger *charger, struct key_state *key, int64_t timeout) argument [all...] |
/system/core/fastboot/ |
H A D | genkey.sh | 9 # 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.
|
/system/core/include/cutils/ |
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 | properties.h | 41 int property_get(const char *key, char *value, const char *default_value); 45 int property_set(const char *key, const char *value); 47 int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie);
|
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);
|
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 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,
|
/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/init/ |
H A D | init.c | 105 /* add_environment - add "key=value" to the current environment */ 106 int add_environment(const char *key, const char *val) argument 112 size_t len = strlen(key) + strlen(val) + 2; 114 snprintf(entry, len, "%s=%s", key, val); 148 char key[64] = ANDROID_SOCKET_ENV_PREFIX; local 151 strlcpy(key + sizeof(ANDROID_SOCKET_ENV_PREFIX) - 1, 153 sizeof(key) - sizeof(ANDROID_SOCKET_ENV_PREFIX)); 155 add_environment(key, val);
|
H A D | property_service.c | 492 char *key, *value, *eol, *sol, *tmp; local 496 key = sol; 500 value = strchr(key, '='); 504 while(isspace(*key)) key++; 505 if(*key == '#') continue; 507 while((tmp > key) && isspace(*tmp)) *tmp-- = 0; 513 property_set(key, value);
|
/system/core/libcorkscrew/ |
H A D | symbol_table.c | 48 static int bcompar(const void *key, const void *element) { argument 49 uintptr_t addr = *(const uintptr_t*)key;
|
/system/core/libcutils/ |
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...] |