Lines Matching refs:alias
125 fn put(&mut self, caller_uid: u32, alias: &str, entry: &[u8]) -> Result<()> { in put()
129 params![caller_uid, alias, entry,], in put()
136 fn get(&mut self, caller_uid: u32, alias: &str) -> Result<Option<Vec<u8>>> { in get()
140 params![caller_uid, alias], in get()
148 fn remove(&mut self, caller_uid: u32, alias: &str) -> Result<bool> { in remove()
152 params![caller_uid, alias], in remove()
318 fn get(&self, alias: &str, uid: i32) -> Result<Vec<u8>> { in get()
322 if let Some(entry) = db.get(uid, alias).context("In get: Trying to load entry from DB.")? { in get()
325 if self.get_legacy(uid, alias).context("In get: Trying to import legacy blob.")? { in get()
328 db.get(uid, alias).context("In get: Trying to load entry from DB.")? in get()
336 fn put(&self, alias: &str, uid: i32, entry: &[u8]) -> Result<()> { in put()
339 db.put(uid, alias, entry).context("In put: Trying to insert entry into DB.")?; in put()
341 let _ = self.remove_legacy(uid, alias); in put()
345 fn remove(&self, alias: &str, uid: i32) -> Result<()> { in remove()
349 if self.remove_legacy(uid, alias).context("In remove: trying to remove legacy entry")? { in remove()
353 db.remove(uid, alias).context("In remove: Trying to remove entry from DB.")?; in remove()
434 fn get_legacy(&self, uid: u32, alias: &str) -> Result<bool> { in get_legacy()
435 let alias = alias.to_string(); in get_legacy() localVariable
437 if state.recently_imported.contains(&(uid, alias.clone())) { in get_legacy()
442 Self::import_one_legacy_entry(uid, &alias, &state.legacy_loader, &mut db) in get_legacy()
445 state.recently_imported.insert((uid, alias)); in get_legacy()
452 fn remove_legacy(&self, uid: u32, alias: &str) -> Result<bool> { in remove_legacy()
453 let alias = alias.to_string(); in remove_legacy() localVariable
455 if state.recently_imported.contains(&(uid, alias.clone())) { in remove_legacy()
460 .remove_legacy_keystore_entry(uid, &alias) in remove_legacy()
471 for alias in entries.iter() { in bulk_delete_uid()
472 if let Err(e) = state.legacy_loader.remove_legacy_keystore_entry(uid, alias) { in bulk_delete_uid()
487 for alias in entries.iter() { in bulk_delete_user()
488 if let Err(e) = state.legacy_loader.remove_legacy_keystore_entry(*uid, alias) { in bulk_delete_user()
499 alias: &str, in import_one_legacy_entry()
504 .read_legacy_keystore_entry(uid, alias, |ciphertext, iv, tag, _salt, _key_size| { in import_one_legacy_entry()
515 db.put(uid, alias, &entry) in import_one_legacy_entry()
518 .remove_legacy_keystore_entry(uid, alias) in import_one_legacy_entry()
534 fn get(&self, alias: &str, uid: i32) -> BinderResult<Vec<u8>> { in get()
536 map_or_log_err(self.legacy_keystore.get(alias, uid), Ok) in get()
538 fn put(&self, alias: &str, uid: i32, entry: &[u8]) -> BinderResult<()> { in put()
540 map_or_log_err(self.legacy_keystore.put(alias, uid, entry), Ok) in put()
542 fn remove(&self, alias: &str, uid: i32) -> BinderResult<()> { in remove()
544 map_or_log_err(self.legacy_keystore.remove(alias, uid), Ok) in remove()
678 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
679 db.put(1, &alias, TEST_BLOB1).expect("Failed to add entry (1)."); in concurrent_legacy_keystore_entry_test()
691 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
692 db.put(2, &alias, TEST_BLOB2).expect("Failed to add entry (2)."); in concurrent_legacy_keystore_entry_test()
700 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
701 db.remove(2, &alias).expect("Remove Failed (2)."); in concurrent_legacy_keystore_entry_test()
714 let alias = format!("test_alias_{}", count); in concurrent_legacy_keystore_entry_test() localVariable
715 db.remove(1, &alias).expect("Remove Failed (1))."); in concurrent_legacy_keystore_entry_test()