/base/security/asset/frameworks/utils/src/ |
H A D | hasher.rs | 38 fn expand_chunk(plain_chunk: [u8; BYTES_PER_CHUNK]) -> [u32; BYTES_PER_CHUNK] { in expand_chunk() 92 fn compress(input_bytes: &[u8]) -> [u32; 8] { in compress() 107 fn pre_process_msg(message: &[u8]) -> Vec<u8> { in pre_process_msg() 119 let split_byte = ((msg_bit_len >> (56 - i * BITS_PER_U8)) & LOWER_BYTES_MASK as usize) as u8; in pre_process_msg() 125 fn into_vec_u8(hash: &[u32; 8]) -> Vec<u8> { in into_vec_u8() 128 ret[i * U8_PER_U32] = ((hash[i] >> 24) & LOWER_BYTES_MASK) as u8; 129 ret[i * U8_PER_U32 + 1] = ((hash[i] >> 16) & LOWER_BYTES_MASK) as u8; 130 ret[i * U8_PER_U32 + 2] = ((hash[i] >> 8) & LOWER_BYTES_MASK) as u8; 131 ret[i * U8_PER_U32 + 3] = (hash[i] & LOWER_BYTES_MASK) as u8; [all...] |
/base/security/asset/services/common/src/ |
H A D | process_info.rs | 26 app_id: *mut u8, 41 process_name: *mut u8, 49 fn init(user_id: u32, uid: u32, process_name: &mut Vec<u8>, app_id: &mut Vec<u8>) -> Self { in init() 70 pub app_id: Vec<u8>, 106 pub process_name: Vec<u8>, 117 let mut process_name = vec![0u8; 256]; in build() 118 let mut app_id: Vec<u8> = vec![0u8; 256]; in build()
|
/base/security/asset/services/crypto_manager/src/ |
H A D | crypto.rs | 48 challenge: Vec<u8>, 49 handle: Vec<u8>, 68 pub fn init_key(&mut self) -> Result<&Vec<u8>> { in init_key() 89 pub fn exec_crypt(&self, cipher: &Vec<u8>, aad: &Vec<u8>, auth_token: &Vec<u8>) -> Result<Vec<u8>> { in exec_crypt() 98 let mut msg: Vec<u8> = vec![0; cipher.len() - TAG_SIZE - NONCE_SIZE]; in exec_crypt() 117 pub fn encrypt(key: &SecretKey, msg: &Vec<u8>, aad: &Vec<u8>) [all...] |
H A D | lib.rs | 27 data: *const u8, 33 data: *mut u8,
|
H A D | secret_key.rs | 31 alias: Vec<u8>, 36 V1(Vec<u8>), // Old secret key alias 37 V2(Vec<u8>), // New secret key alias 50 const ALIAS_PREFIX: [u8; 2] = [b'1', b'_']; 52 fn append_attr<T>(tag: &str, value: T, vec: &mut Vec<u8>) in append_attr() 71 ) -> Vec<u8> { in calculate_key_alias() 72 let mut alias: Vec<u8> = Vec::with_capacity(MAX_ALIAS_SIZE); in calculate_key_alias() 137 alias: Vec<u8>, in huks_rename_key_alias() 194 alias: Vec<u8>, in new_with_alias() 289 pub(crate) fn alias(&self) -> &Vec<u8> { [all...] |
/base/update/updater/services/rust/hash_signed_data/src/ |
H A D | evp.rs | 20 pub fn get_b64_decode_len(in_data: &[u8]) -> Result<(usize, usize), String> in get_b64_decode_len() 37 pub fn evp_decode_block(in_data: &[u8]) -> Result<Vec<u8>, String> in evp_decode_block() 40 let mut out_data = Vec::<u8>::new(); in evp_decode_block()
|
H A D | lib.rs | 69 out: *mut u8, out_len: usize, file_name: *const c_char) -> usize 125 pub unsafe extern fn LoadImgHashData(hash_data: *const u8, len: usize) 133 let hash_data_vec: Vec<u8> = unsafe {Vec::from_raw_parts(hash_data as *mut u8, len, len)}; 154 pub unsafe extern fn LoadImgHashDataNew(hash_data: *const u8, len: usize) 162 let hash_data_vec: Vec<u8> = unsafe {Vec::from_raw_parts(hash_data as *mut u8, len, len)}; 184 img_name: *const c_char, start: T, end: T, hash_value: *const u8, len: usize) -> bool 203 let hash_value_vec: Vec<u8> = unsafe {Vec::from_raw_parts(hash_value as *mut u8, le [all...] |
H A D | img_hash_check.rs | 39 fn read_le_bytes(buffer: &[u8]) -> Self; in read_le_bytes() 43 fn read_le_bytes(buffer: &[u8]) -> Self { in read_le_bytes() 49 fn read_le_bytes(buffer: &[u8]) -> Self { in read_le_bytes() 66 hash_data: Vec<u8> 73 sign_data: Vec<u8> 82 data: HashMap<String, HashMap<Tuple<T>, Vec<u8>>> 88 fn read_from_le_bytes(&mut self, buffer: &[u8]) -> bool; in read_from_le_bytes() 96 fn read_from_le_bytes(&mut self, buffer: &[u8]) -> bool { in read_from_le_bytes() 117 fn read_from_le_bytes(&mut self, buffer: &[u8]) -> bool { in read_from_le_bytes() 136 fn read_from_le_bytes(&mut self, buffer: &[u8]) [all...] |
/base/request/request/services/src/manage/scheduler/state/ |
H A D | sql.rs | 21 const RUNNING: u8 = State::Running.repr; 22 const RETRYING: u8 = State::Retrying.repr; 23 const WAITING: u8 = State::Waiting.repr; 24 const FAILED: u8 = State::Failed.repr; 26 const APP_BACKGROUND_OR_TERMINATE: u8 = Reason::AppBackgroundOrTerminate.repr; 27 const RUNNING_TASK_MEET_LIMITS: u8 = Reason::RunningTaskMeetLimits.repr; 28 const ACCOUNT_STOPPED: u8 = Reason::AccountStopped.repr; 29 const NETWORK_OFFLINE: u8 = Reason::NetworkOffline.repr; 30 const UNSUPPORTED_NETWORK_TYPE: u8 = Reason::UnsupportedNetworkType.repr; 31 const NETWORK_APP: u8 [all...] |
/base/security/asset/services/db_key_operator/src/ |
H A D | lib.rs | 58 fn GenerateRandom(random: *mut u8, random_len: u32) -> i32; in GenerateRandom() 64 pub db_key: Vec<u8>, 68 fn decrypt_db_key_cipher(user_id: i32, db_key_cipher: &Vec<u8>) -> Result<DbKey> { in decrypt_db_key_cipher() 70 let aad: Vec<u8> = TRIVIAL_AAD_FOR_DB_KEY.as_bytes().to_vec(); in decrypt_db_key_cipher() 85 fn encrypt_db_key(&self, user_id: i32) -> Result<Vec<u8>> { in encrypt_db_key() 88 let aad: Vec<u8> = TRIVIAL_AAD_FOR_DB_KEY.as_bytes().to_vec(); in encrypt_db_key()
|
/base/security/code_signature/services/key_enable/src/ |
H A D | key_enable.rs | 52 fn InitLocalCertificate(cert_data: *mut u8, cert_size: *mut usize) -> i32;
in InitLocalCertificate() 54 type_name: *const u8,
in AddKey() 55 description: *const u8,
in AddKey() 56 payload: *const u8,
in AddKey() 62 type_name: *const u8,
in KeyctlRestrictKeyring() 63 restriction: *const u8,
in KeyctlRestrictKeyring() 74 fn get_local_key() -> Option<Vec<u8>> {
in get_local_key() 112 fn enable_key(key_id: KeySerial, key_name: &str, cert_data: &Vec<u8>) -> i32 {
in enable_key() 127 fn enable_key_list(key_id: KeySerial, certs: Vec<Vec<u8>>, key_name_prefix: &str) -> i32 {
in enable_key_list()
|
/base/msdp/device_status/rust/subsystem/input/sys/src/ |
H A D | input_binding.rs | 24 _private: [u8; 0], 31 _private: [u8; 0], 38 _private: [u8; 0], 58 pub buffer: *const u8,
|
/base/request/request/services/src/task/ |
H A D | info.rs | 65 pub(crate) action: u8, 66 pub(crate) mode: u8, 69 pub(crate) reason: u8, 73 pub(crate) version: u8, 89 #[repr(u8)] 118 pub(crate) reason: u8, 125 impl From<u8> for State { 126 fn from(value: u8) -> Self { in from()
|
H A D | reason.rs | 19 #[repr(u8)] 50 impl From<u8> for Reason { 51 fn from(value: u8) -> Self { in from()
|
H A D | config.rs | 33 #[repr(u8)] 45 #[repr(u8)] 57 #[repr(u8)] 65 #[repr(u8)] 183 impl From<u8> for Mode { 184 fn from(value: u8) -> Self { in from() 193 impl From<u8> for Action { 194 fn from(value: u8) -> Self { in from() 203 impl From<u8> for Version { 204 fn from(value: u8) [all...] |
H A D | ffi.rs | 33 pub(crate) bundle_type: u8, 45 pub(crate) version: u8, 62 pub(crate) action: u8, 63 pub(crate) mode: u8, 65 pub(crate) network: u8, 82 pub(crate) reason: u8, 183 let mime_type = if c_struct.common_data.version == Version::API9 as u8 233 pub(crate) reason: u8, 265 bundle_type: self.bundle_type as u8, 277 version: self.version as u8, [all...] |
/base/sensors/sensor/rust/utils/socket_ipc_rust_ffi/src/stream_buffer/ |
H A D | binding.rs | 21 _private: [u8; 0], 26 _private: [u8; 0],
|
/base/request/request/services/src/service/command/ |
H A D | search.rs | 49 state: state as u8, 50 action: action as u8, 51 mode: mode as u8,
|
/base/hiviewdfx/hitrace/interfaces/rust/innerkits/hitracechain/src/ |
H A D | lib.rs | 248 pub fn id_to_bytes(p_id: &HiTraceId, p_id_array: &mut [u8]) -> i32 { in id_to_bytes() 250 let mut id_array_wrapper: Vec<u8> = vec![]; in id_to_bytes() 265 pub fn bytes_to_id(p_id_array: &[u8]) -> HiTraceId { in bytes_to_id() 266 let mut id_array_wrapper: Vec<u8> = vec![]; in bytes_to_id() 296 fn HiTraceChainIdToBytesWrapper(id: *const HiTraceId, p_id_array: *const u8, len: c_int) -> c_int; in HiTraceChainIdToBytesWrapper() 299 fn HiTraceChainBytesToIdWrapper(p_id_array: *const u8, len: c_int) -> HiTraceId; in HiTraceChainBytesToIdWrapper()
|
/base/msdp/device_status/rust/data/sys/src/ipc/ |
H A D | drag.rs | 43 buffer: *const u8, 99 pub buffer: Vec<u8>, 121 let mut buf: Vec<u8> = Vec::new(); in from_c() 167 buffer: Vec::<u8>::deserialize(parcel)?, in deserialize()
|
/base/security/asset/services/db_operator/src/ |
H A D | statement.rs | 32 fn SqlitePrepareV2(db: *mut c_void, z_sql: *const u8, pp_stmt: *mut *mut c_void, pz_tail: *mut *mut u8) -> i32; in SqlitePrepareV2() 33 fn SqliteBindBlob(stmt: *mut c_void, index: i32, blob: *const u8, n: i32, callback: Option<BindCallback>) -> i32; in SqliteBindBlob() 36 fn SqliteColumnName(stmt: *mut c_void, n: i32) -> *const u8; in SqliteColumnName() 38 fn SqliteColumnBlob(stmt: *mut c_void, i_col: i32) -> *const u8; in SqliteColumnBlob() 156 pub(crate) fn query_column_blob(&self, index: i32) -> &[u8] {
|
/base/request/request/test/rustest/src/ |
H A D | lib.rs | 79 let mut buf = [0u8; 4096]; in new() 423 fn deserialize(mut input: &[u8]) -> (u32, MessageInfo) { in deserialize() 486 impl Take<u16> for &[u8] { 494 impl Take<u32> for &[u8] { 502 impl Take<u64> for &[u8] { 510 impl Take<Vec<u64>> for &[u8] { 521 impl Take<HashMap<String, String>> for &[u8] { 534 impl Take<String> for &[u8] { 547 impl Take<SubscribeType> for &[u8] { 565 impl Take<State> for &[u8] { [all...] |
/base/hiviewdfx/hisysevent/interfaces/rust/innerkits/src/ |
H A D | sys_event.rs | 32 pub u8_: u8, 164 pub param_name: [u8; MAX_LENGTH_OF_PARAM_NAME],
|
/base/msdp/device_status/rust/subsystem/input/sys/src/interaction/ |
H A D | extra_data.rs | 41 pub fn set_buffer(&mut self, vec: &Vec<u8>) -> &mut Self { in set_buffer() 76 let buffer: &Vec<u8>= &drag_data.buffer; in appended_extra_data()
|
/base/request/request/pre_download/native/src/cache/ |
H A D | data.rs | 24 Ram(Vec<u8>), 122 fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> { in write() 142 Cursor(Cursor<&'a [u8]>), 147 fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> { in read()
|