1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *    http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OEMKEY_H
17 #define OEMKEY_H
18 /**
19  * @addtogroup TeeTrusted
20  * @{
21  *
22  * @brief TEE(Trusted Excution Environment) API.
23  * Provides security capability APIs such as trusted storage, encryption and decryption,
24  * and trusted time for trusted application development.
25  *
26  * @since 12
27  */
28 
29 /**
30  * @file oemkey.h
31  *
32  * @brief Provides the method for obtaining the hardware provision key.
33  *
34  * @library NA
35  * @kit TEEKit
36  * @syscap SystemCapability.Tee.TeeClient
37  * @since 12
38  * @version 1.0
39  */
40 
41 #include <stdint.h>
42 #include <stdlib.h>
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 /**
48  * @brief Obtains the provision key.
49  *
50  * @param oem_key Indicates the pointer to the buffer for storing the provision key.
51  * @param key_size Indicates the length of the buffer used to store the provision key, which is 16.
52  *
53  * @return Returns <b>0</b> if the operation is successful.
54  * @return Returns other values otherwise.
55  *
56  * @since 12
57  */
58 uint32_t tee_hal_get_provision_key(uint8_t *oem_key, size_t key_size);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 /** @} */
65 #endif
66