Lines Matching refs:alias

31     alias: Vec<u8>,
36 V1(Vec<u8>), // Old secret key alias
37 V2(Vec<u8>), // New secret key alias
38 V3, // Prefixed new secret key alias
72 let mut alias: Vec<u8> = Vec::with_capacity(MAX_ALIAS_SIZE);
73 alias.extend_from_slice(&calling_info.user_id().to_le_bytes());
74 alias.push(b'_');
75 alias.extend_from_slice(&calling_info.owner_type().to_le_bytes());
76 alias.push(b'_');
77 alias.extend(calling_info.owner_info());
78 append_attr::<AuthType>("AuthType", auth_type, &mut alias);
79 append_attr::<Accessibility>("Accessibility", access_type, &mut alias);
80 append_attr::<bool>("RequirePasswordSet", require_password_set, &mut alias);
81 hasher::sha256(standard, &alias)
97 alias: prefixed_new_alias.clone(),
100 logi!("[INFO][{access_type}]-typed secret key with v3 alias exists.");
109 alias: new_alias.clone(),
112 logi!("[INFO][{access_type}]-typed secret key with v2 alias exists.");
122 alias: old_alias.clone(),
125 logi!("[INFO][{access_type}]-typed secret key with v1 alias exists.");
137 alias: Vec<u8>,
139 // Prepare secret key id with outdated alias.
140 let alias_ref = &alias;
141 let alias_blob = HksBlob { size: alias.len() as u32, data: alias_ref.as_ptr() };
144 // Prepare secret key alias to be replaced in.
154 /// Rename a secret key alias.
166 Ok(KeyAliasVersion::V2(alias)) | Ok(KeyAliasVersion::V1(alias)) => {
167 let ret = huks_rename_key_alias(calling_info, auth_type, access_type, require_password_set, alias);
169 logi!("[INFO]Rename alias of [{access_type}]-typed secret key success.");
172 loge!("[FATAL]Rename alias of [{access_type}]-typed secret key failed, err is {}.", ret);
188 /// New a secret key with the input key alias argument.
194 alias: Vec<u8>,
196 Ok(Self { user_id, auth_type, access_type, require_password_set, alias })
199 /// Calculate key alias and then new a secret key.
213 alias: prefixed_new_alias,
220 let key_alias = HksBlob { size: self.alias.len() as u32, data: self.alias.as_ptr() };
232 let key_alias = HksBlob { size: self.alias.len() as u32, data: self.alias.as_ptr() };
243 let key_alias = HksBlob { size: self.alias.len() as u32, data: self.alias.as_ptr() };
288 /// Get the key alias.
289 pub(crate) fn alias(&self) -> &Vec<u8> {
290 &self.alias