1dfe32fa1Soh_ci/*
2dfe32fa1Soh_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
3dfe32fa1Soh_ci * Licensed under the Apache License, Version 2.0 (the "License");
4dfe32fa1Soh_ci * you may not use this file except in compliance with the License.
5dfe32fa1Soh_ci * You may obtain a copy of the License at
6dfe32fa1Soh_ci *
7dfe32fa1Soh_ci *     http://www.apache.org/licenses/LICENSE-2.0
8dfe32fa1Soh_ci *
9dfe32fa1Soh_ci * Unless required by applicable law or agreed to in writing, software
10dfe32fa1Soh_ci * distributed under the License is distributed on an "AS IS" BASIS,
11dfe32fa1Soh_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12dfe32fa1Soh_ci * See the License for the specific language governing permissions and
13dfe32fa1Soh_ci * limitations under the License.
14dfe32fa1Soh_ci */
15dfe32fa1Soh_ci
16dfe32fa1Soh_ci//! This module is used to manage the life cycle of Asset.
17dfe32fa1Soh_ci
18dfe32fa1Soh_cipub mod crypto;
19dfe32fa1Soh_cipub mod crypto_manager;
20dfe32fa1Soh_cipub mod secret_key;
21dfe32fa1Soh_ci
22dfe32fa1Soh_ciuse asset_definition::Accessibility;
23dfe32fa1Soh_ci
24dfe32fa1Soh_ci#[repr(C)]
25dfe32fa1Soh_cistruct HksBlob {
26dfe32fa1Soh_ci    size: u32,
27dfe32fa1Soh_ci    data: *const u8,
28dfe32fa1Soh_ci}
29dfe32fa1Soh_ci
30dfe32fa1Soh_ci#[repr(C)]
31dfe32fa1Soh_cistruct OutBlob {
32dfe32fa1Soh_ci    size: u32,
33dfe32fa1Soh_ci    data: *mut u8,
34dfe32fa1Soh_ci}
35dfe32fa1Soh_ci
36dfe32fa1Soh_ci#[repr(C)]
37dfe32fa1Soh_cistruct KeyId {
38dfe32fa1Soh_ci    user_id: i32,
39dfe32fa1Soh_ci    alias: HksBlob,
40dfe32fa1Soh_ci    accessibility: Accessibility,
41dfe32fa1Soh_ci}
42dfe32fa1Soh_ci
43dfe32fa1Soh_ciimpl KeyId {
44dfe32fa1Soh_ci    fn new(user_id: i32, alias: HksBlob, accessibility: Accessibility) -> Self {
45dfe32fa1Soh_ci        Self { user_id, alias, accessibility }
46dfe32fa1Soh_ci    }
47dfe32fa1Soh_ci}
48