tee_internal/
binding.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3// Copyright 2024 The Fuchsia Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style license that can be
5// found in the LICENSE file.
6
7#![allow(dead_code)]
8#![allow(non_camel_case_types)]
9#![allow(non_snake_case)]
10#![allow(non_upper_case_globals)]
11#![allow(clippy::missing_safety_doc)]
12
13// This file is automatically generated by //src/tee/tee_internal_api/generate.py.
14
15#[repr(C)]
16#[derive(Default)]
17pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
18impl<T> __IncompleteArrayField<T> {
19    #[inline]
20    pub const fn new() -> Self {
21        __IncompleteArrayField(::std::marker::PhantomData, [])
22    }
23    #[inline]
24    pub fn as_ptr(&self) -> *const T {
25        self as *const _ as *const T
26    }
27    #[inline]
28    pub fn as_mut_ptr(&mut self) -> *mut T {
29        self as *mut _ as *mut T
30    }
31    #[inline]
32    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
33        ::std::slice::from_raw_parts(self.as_ptr(), len)
34    }
35    #[inline]
36    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
37        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
38    }
39}
40impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
41    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
42        fmt.write_str("__IncompleteArrayField")
43    }
44}
45pub const TEE_HANDLE_NULL: u32 = 0;
46pub const TEE_SUCCESS: u32 = 0;
47pub const TEE_ERROR_CORRUPT_OBJECT: u32 = 4027580417;
48pub const TEE_ERROR_CORRUPT_OBJECT_2: u32 = 4027580418;
49pub const TEE_ERROR_STORAGE_NOT_AVAILABLE: u32 = 4027580419;
50pub const TEE_ERROR_STORAGE_NOT_AVAILABLE_2: u32 = 4027580420;
51pub const TEE_ERROR_UNSUPPORTED_VERSION: u32 = 4027580421;
52pub const TEE_ERROR_CIPHERTEXT_INVALID: u32 = 4027580422;
53pub const TEE_ERROR_GENERIC: u32 = 4294901760;
54pub const TEE_ERROR_ACCESS_DENIED: u32 = 4294901761;
55pub const TEE_ERROR_CANCEL: u32 = 4294901762;
56pub const TEE_ERROR_ACCESS_CONFLICT: u32 = 4294901763;
57pub const TEE_ERROR_EXCESS_DATA: u32 = 4294901764;
58pub const TEE_ERROR_BAD_FORMAT: u32 = 4294901765;
59pub const TEE_ERROR_BAD_PARAMETERS: u32 = 4294901766;
60pub const TEE_ERROR_BAD_STATE: u32 = 4294901767;
61pub const TEE_ERROR_ITEM_NOT_FOUND: u32 = 4294901768;
62pub const TEE_ERROR_NOT_IMPLEMENTED: u32 = 4294901769;
63pub const TEE_ERROR_NOT_SUPPORTED: u32 = 4294901770;
64pub const TEE_ERROR_NO_DATA: u32 = 4294901771;
65pub const TEE_ERROR_OUT_OF_MEMORY: u32 = 4294901772;
66pub const TEE_ERROR_BUSY: u32 = 4294901773;
67pub const TEE_ERROR_COMMUNICATION: u32 = 4294901774;
68pub const TEE_ERROR_SECURITY: u32 = 4294901775;
69pub const TEE_ERROR_SHORT_BUFFER: u32 = 4294901776;
70pub const TEE_ERROR_EXTERNAL_CANCEL: u32 = 4294901777;
71pub const TEE_ERROR_TIMEOUT: u32 = 4294914049;
72pub const TEE_ERROR_OVERFLOW: u32 = 4294914063;
73pub const TEE_ERROR_TARGET_DEAD: u32 = 4294914084;
74pub const TEE_ERROR_STORAGE_NO_SPACE: u32 = 4294914113;
75pub const TEE_ERROR_MAC_INVALID: u32 = 4294914161;
76pub const TEE_ERROR_SIGNATURE_INVALID: u32 = 4294914162;
77pub const TEE_ERROR_TIME_NOT_SET: u32 = 4294922240;
78pub const TEE_ERROR_TIME_NEEDS_RESET: u32 = 4294922241;
79pub const TEE_PARAM_TYPE_NONE: u32 = 0;
80pub const TEE_PARAM_TYPE_VALUE_INPUT: u32 = 1;
81pub const TEE_PARAM_TYPE_VALUE_OUTPUT: u32 = 2;
82pub const TEE_PARAM_TYPE_VALUE_INOUT: u32 = 3;
83pub const TEE_PARAM_TYPE_MEMREF_INPUT: u32 = 5;
84pub const TEE_PARAM_TYPE_MEMREF_OUTPUT: u32 = 6;
85pub const TEE_PARAM_TYPE_MEMREF_INOUT: u32 = 7;
86pub const TEE_LOGIN_PUBLIC: u32 = 0;
87pub const TEE_LOGIN_USER: u32 = 1;
88pub const TEE_LOGIN_GROUP: u32 = 2;
89pub const TEE_LOGIN_APPLICATION: u32 = 4;
90pub const TEE_LOGIN_APPLICATION_USER: u32 = 5;
91pub const TEE_LOGIN_APPLICATION_GROUP: u32 = 6;
92pub const TEE_LOGIN_TRUSTED_APP: u32 = 4026531840;
93pub const TEE_ORIGIN_API: u32 = 1;
94pub const TEE_ORIGIN_COMMS: u32 = 2;
95pub const TEE_ORIGIN_TEE: u32 = 3;
96pub const TEE_ORIGIN_TRUSTED_APP: u32 = 4;
97pub const TEE_MEMORY_ACCESS_READ: u32 = 1;
98pub const TEE_MEMORY_ACCESS_WRITE: u32 = 2;
99pub const TEE_MEMORY_ACCESS_ANY_OWNER: u32 = 4;
100pub const TEE_DATA_SEEK_SET: u32 = 0;
101pub const TEE_DATA_SEEK_CUR: u32 = 1;
102pub const TEE_DATA_SEEK_END: u32 = 2;
103pub const TEE_WHENCE_ILLEGAL_VALUE: u32 = 2147483647;
104pub const TEE_STORAGE_PRIVATE: u32 = 1;
105pub const TEE_STORAGE_PERSO: u32 = 2;
106pub const TEE_STORAGE_PROTECTED: u32 = 3;
107pub const TEE_STORAGE_ILLEGAL_VALUE: u32 = 2147483647;
108pub const TEE_DATA_FLAG_ACCESS_READ: u32 = 1;
109pub const TEE_DATA_FLAG_ACCESS_WRITE: u32 = 2;
110pub const TEE_DATA_FLAG_ACCESS_WRITE_META: u32 = 4;
111pub const TEE_DATA_FLAG_SHARE_READ: u32 = 16;
112pub const TEE_DATA_FLAG_SHARE_WRITE: u32 = 32;
113pub const TEE_DATA_FLAG_OVERWRITE: u32 = 1024;
114pub const TEE_DATA_FLAG_EXCLUSIVE: u32 = 1024;
115pub const TEE_USAGE_EXTRACTABLE: u32 = 1;
116pub const TEE_USAGE_ENCRYPT: u32 = 2;
117pub const TEE_USAGE_DECRYPT: u32 = 4;
118pub const TEE_USAGE_MAC: u32 = 8;
119pub const TEE_USAGE_SIGN: u32 = 16;
120pub const TEE_USAGE_VERIFY: u32 = 32;
121pub const TEE_USAGE_DERIVE: u32 = 64;
122pub const TEE_DATA_MAX_POSITION: u32 = 4294967295;
123pub const TEE_OBJECT_ID_MAX_LEN: u32 = 64;
124pub const TEE_HANDLE_FLAG_PERSISTENT: u32 = 65536;
125pub const TEE_HANDLE_FLAG_INITIALIZED: u32 = 131072;
126pub const TEE_HANDLE_FLAG_KEY_SET: u32 = 262144;
127pub const TEE_HANDLE_FLAG_EXPECT_TWO_KEYS: u32 = 524288;
128pub const TEE_HANDLE_FLAG_EXTRACTING: u32 = 1048576;
129pub const TEE_OPERATION_CIPHER: u32 = 1;
130pub const TEE_OPERATION_MAC: u32 = 3;
131pub const TEE_OPERATION_AE: u32 = 4;
132pub const TEE_OPERATION_DIGEST: u32 = 5;
133pub const TEE_OPERATION_ASYMMETRIC_CIPHER: u32 = 6;
134pub const TEE_OPERATION_ASYMMETRIC_SIGNATURE: u32 = 7;
135pub const TEE_OPERATION_KEY_DERIVATION: u32 = 8;
136pub const TEE_OPERATION_STATE_INITIAL: u32 = 0;
137pub const TEE_OPERATION_STATE_ACTIVE: u32 = 1;
138pub const TEE_OPERATION_STATE_EXTRACTING: u32 = 2;
139pub const TEE_MODE_ENCRYPT: u32 = 0;
140pub const TEE_MODE_DECRYPT: u32 = 1;
141pub const TEE_MODE_SIGN: u32 = 2;
142pub const TEE_MODE_VERIFY: u32 = 3;
143pub const TEE_MODE_MAC: u32 = 4;
144pub const TEE_MODE_DIGEST: u32 = 5;
145pub const TEE_MODE_DERIVE: u32 = 6;
146pub const TEE_MODE_ILLEGAL_VALUE: u32 = 2147483647;
147pub const TEE_ALG_AES_ECB_NOPAD: u32 = 268435472;
148pub const TEE_ALG_AES_CBC_NOPAD: u32 = 268435728;
149pub const TEE_ALG_AES_CTR: u32 = 268435984;
150pub const TEE_ALG_AES_CTS: u32 = 268436240;
151pub const TEE_ALG_AES_XTS: u32 = 268436496;
152pub const TEE_ALG_AES_CBC_MAC_NOPAD: u32 = 805306640;
153pub const TEE_ALG_AES_CBC_MAC_PKCS5: u32 = 805307664;
154pub const TEE_ALG_AES_CMAC: u32 = 805307920;
155pub const TEE_ALG_AES_CCM: u32 = 1073743632;
156pub const TEE_ALG_AES_GCM: u32 = 1073743888;
157pub const TEE_ALG_DES_ECB_NOPAD: u32 = 268435473;
158pub const TEE_ALG_DES_CBC_NOPAD: u32 = 268435729;
159pub const TEE_ALG_DES_CBC_MAC_NOPAD: u32 = 805306641;
160pub const TEE_ALG_DES_CBC_MAC_PKCS5: u32 = 805307665;
161pub const TEE_ALG_DES3_ECB_NOPAD: u32 = 268435475;
162pub const TEE_ALG_DES3_CBC_NOPAD: u32 = 268435731;
163pub const TEE_ALG_DES3_CBC_MAC_NOPAD: u32 = 805306643;
164pub const TEE_ALG_DES3_CBC_MAC_PKCS5: u32 = 805307667;
165pub const TEE_ALG_RSASSA_PKCS1_V1_5_MD5: u32 = 1879054384;
166pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA1: u32 = 1879058480;
167pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA224: u32 = 1879062576;
168pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA256: u32 = 1879066672;
169pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA384: u32 = 1879070768;
170pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA512: u32 = 1879074864;
171pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_224: u32 = 1879083056;
172pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_256: u32 = 1879087152;
173pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_384: u32 = 1879091248;
174pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_512: u32 = 1879095344;
175pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA1: u32 = 1881221424;
176pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA224: u32 = 1882274096;
177pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256: u32 = 1883326768;
178pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA384: u32 = 1884379440;
179pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA512: u32 = 1885432112;
180pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_224: u32 = 1887537456;
181pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_256: u32 = 1888590128;
182pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_384: u32 = 1889642800;
183pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_512: u32 = 1890695472;
184pub const TEE_ALG_RSAES_PKCS1_V1_5: u32 = 1610613040;
185pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1: u32 = 1612775984;
186pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA224: u32 = 1613824560;
187pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256: u32 = 1614873136;
188pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384: u32 = 1615921712;
189pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512: u32 = 1616970288;
190pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_224: u32 = 1619067440;
191pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_256: u32 = 1620116016;
192pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_384: u32 = 1621164592;
193pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_512: u32 = 1622213168;
194pub const TEE_ALG_RSA_NOPAD: u32 = 1610612784;
195pub const TEE_ALG_DSA_SHA1: u32 = 1879056689;
196pub const TEE_ALG_DSA_SHA224: u32 = 1879060785;
197pub const TEE_ALG_DSA_SHA256: u32 = 1879064881;
198pub const TEE_ALG_DSA_SHA3_224: u32 = 1879081265;
199pub const TEE_ALG_DSA_SHA3_256: u32 = 1879085361;
200pub const TEE_ALG_DSA_SHA3_384: u32 = 1879089457;
201pub const TEE_ALG_DSA_SHA3_512: u32 = 1879093553;
202pub const TEE_ALG_DH_DERIVE_SHARED_SECRET: u32 = 2147483698;
203pub const TEE_ALG_MD5: u32 = 1342177281;
204pub const TEE_ALG_SHA1: u32 = 1342177282;
205pub const TEE_ALG_SHA224: u32 = 1342177283;
206pub const TEE_ALG_SHA256: u32 = 1342177284;
207pub const TEE_ALG_SHA384: u32 = 1342177285;
208pub const TEE_ALG_SHA512: u32 = 1342177286;
209pub const TEE_ALG_SHA3_224: u32 = 1342177288;
210pub const TEE_ALG_SHA3_256: u32 = 1342177289;
211pub const TEE_ALG_SHA3_384: u32 = 1342177290;
212pub const TEE_ALG_SHA3_512: u32 = 1342177291;
213pub const TEE_ALG_HMAC_MD5: u32 = 805306369;
214pub const TEE_ALG_HMAC_SHA1: u32 = 805306370;
215pub const TEE_ALG_HMAC_SHA224: u32 = 805306371;
216pub const TEE_ALG_HMAC_SHA256: u32 = 805306372;
217pub const TEE_ALG_HMAC_SHA384: u32 = 805306373;
218pub const TEE_ALG_HMAC_SHA512: u32 = 805306374;
219pub const TEE_ALG_HMAC_SHA3_224: u32 = 805306376;
220pub const TEE_ALG_HMAC_SHA3_256: u32 = 805306377;
221pub const TEE_ALG_HMAC_SHA3_384: u32 = 805306378;
222pub const TEE_ALG_HMAC_SHA3_512: u32 = 805306379;
223pub const TEE_ALG_HKDF: u32 = 2147483719;
224pub const TEE_ALG_SHAKE128: u32 = 1342177537;
225pub const TEE_ALG_SHAKE256: u32 = 1342177538;
226pub const TEE_ALG_ILLEGAL_VALUE: u32 = 4026531839;
227pub const TEE_TYPE_AES: u32 = 2684354576;
228pub const TEE_TYPE_DES: u32 = 2684354577;
229pub const TEE_TYPE_DES3: u32 = 2684354579;
230pub const TEE_TYPE_HMAC_MD5: u32 = 2684354561;
231pub const TEE_TYPE_HMAC_SHA1: u32 = 2684354562;
232pub const TEE_TYPE_HMAC_SHA224: u32 = 2684354563;
233pub const TEE_TYPE_HMAC_SHA256: u32 = 2684354564;
234pub const TEE_TYPE_HMAC_SHA384: u32 = 2684354565;
235pub const TEE_TYPE_HMAC_SHA512: u32 = 2684354566;
236pub const TEE_TYPE_HMAC_SM3: u32 = 2684354567;
237pub const TEE_TYPE_HMAC_SHA3_224: u32 = 2684354568;
238pub const TEE_TYPE_HMAC_SHA3_256: u32 = 2684354569;
239pub const TEE_TYPE_HMAC_SHA3_384: u32 = 2684354570;
240pub const TEE_TYPE_HMAC_SHA3_512: u32 = 2684354571;
241pub const TEE_TYPE_RSA_PUBLIC_KEY: u32 = 2684354608;
242pub const TEE_TYPE_RSA_KEYPAIR: u32 = 2701131824;
243pub const TEE_TYPE_DSA_PUBLIC_KEY: u32 = 2684354609;
244pub const TEE_TYPE_DSA_KEYPAIR: u32 = 2701131825;
245pub const TEE_TYPE_DH_KEYPAIR: u32 = 2701131826;
246pub const TEE_TYPE_ECDSA_PUBLIC_KEY: u32 = 2684354625;
247pub const TEE_TYPE_ECDSA_KEYPAIR: u32 = 2701131841;
248pub const TEE_TYPE_ECDH_PUBLIC_KEY: u32 = 2684354626;
249pub const TEE_TYPE_ECDH_KEYPAIR: u32 = 2701131842;
250pub const TEE_TYPE_ED25519_PUBLIC_KEY: u32 = 2684354627;
251pub const TEE_TYPE_ED25519_KEYPAIR: u32 = 2701131843;
252pub const TEE_TYPE_X25519_PUBLIC_KEY: u32 = 2684354628;
253pub const TEE_TYPE_X25519_KEYPAIR: u32 = 2701131844;
254pub const TEE_TYPE_SM2_DSA_PUBLIC_KEY: u32 = 2684354629;
255pub const TEE_TYPE_SM2_DSA_KEYPAIR: u32 = 2701131845;
256pub const TEE_TYPE_SM2_KEP_PUBLIC_KEY: u32 = 2684354630;
257pub const TEE_TYPE_SM2_KEP_KEYPAIR: u32 = 2701131846;
258pub const TEE_TYPE_SM2_PKE_PUBLIC_KEY: u32 = 2684354631;
259pub const TEE_TYPE_SM2_PKE_KEYPAIR: u32 = 2701131847;
260pub const TEE_TYPE_SM4: u32 = 2684354580;
261pub const TEE_TYPE_HKDF: u32 = 2684354634;
262pub const TEE_TYPE_GENERIC_SECRET: u32 = 2684354560;
263pub const TEE_TYPE_CORRUPTED_OBJECT: u32 = 2684354750;
264pub const TEE_TYPE_DATA: u32 = 2684354751;
265pub const TEE_TYPE_ILLEGAL_VALUE: u32 = 4026531839;
266pub const TEE_CRYPTO_ELEMENT_NONE: u32 = 0;
267pub const TEE_ECC_CURVE_NIST_P192: u32 = 1;
268pub const TEE_ECC_CURVE_NIST_P224: u32 = 2;
269pub const TEE_ECC_CURVE_NIST_P256: u32 = 3;
270pub const TEE_ECC_CURVE_NIST_P384: u32 = 4;
271pub const TEE_ECC_CURVE_NIST_P521: u32 = 5;
272pub const TEE_ECC_CURVE_BSI_P160r1: u32 = 257;
273pub const TEE_ECC_CURVE_BSI_P192r1: u32 = 258;
274pub const TEE_ECC_CURVE_BSI_P224r1: u32 = 259;
275pub const TEE_ECC_CURVE_BSI_P256r1: u32 = 260;
276pub const TEE_ECC_CURVE_BSI_P320r1: u32 = 261;
277pub const TEE_ECC_CURVE_BSI_P384r1: u32 = 262;
278pub const TEE_ECC_CURVE_BSI_P512r1: u32 = 263;
279pub const TEE_ECC_CURVE_BSI_P160t1: u32 = 513;
280pub const TEE_ECC_CURVE_BSI_P192t1: u32 = 514;
281pub const TEE_ECC_CURVE_BSI_P224t1: u32 = 515;
282pub const TEE_ECC_CURVE_BSI_P256t1: u32 = 516;
283pub const TEE_ECC_CURVE_BSI_P320t1: u32 = 517;
284pub const TEE_ECC_CURVE_BSI_P384t1: u32 = 518;
285pub const TEE_ECC_CURVE_BSI_P512t1: u32 = 519;
286pub const TEE_ECC_CURVE_25519: u32 = 768;
287pub const TEE_ECC_CURVE_448: u32 = 769;
288pub const TEE_ECC_CURVE_SM2: u32 = 768;
289pub const TEE_ATTR_SECRET_VALUE: u32 = 3221225472;
290pub const TEE_ATTR_RSA_MODULUS: u32 = 3489661232;
291pub const TEE_ATTR_RSA_PUBLIC_EXPONENT: u32 = 3489661488;
292pub const TEE_ATTR_RSA_PRIVATE_EXPONENT: u32 = 3221226288;
293pub const TEE_ATTR_RSA_PRIME1: u32 = 3221226544;
294pub const TEE_ATTR_RSA_PRIME2: u32 = 3221226800;
295pub const TEE_ATTR_RSA_EXPONENT1: u32 = 3221227056;
296pub const TEE_ATTR_RSA_EXPONENT2: u32 = 3221227312;
297pub const TEE_ATTR_RSA_COEFFICIENT: u32 = 3221227568;
298pub const TEE_ATTR_DSA_PRIME: u32 = 3489665073;
299pub const TEE_ATTR_DSA_SUBPRIME: u32 = 3489665329;
300pub const TEE_ATTR_DSA_BASE: u32 = 3489665585;
301pub const TEE_ATTR_DSA_PUBLIC_VALUE: u32 = 3489661233;
302pub const TEE_ATTR_DSA_PRIVATE_VALUE: u32 = 3221226033;
303pub const TEE_ATTR_DH_PRIME: u32 = 3489665074;
304pub const TEE_ATTR_DH_SUBPRIME: u32 = 3489665330;
305pub const TEE_ATTR_DH_BASE: u32 = 3489665586;
306pub const TEE_ATTR_DH_X_BITS: u32 = 4026536754;
307pub const TEE_ATTR_DH_PUBLIC_VALUE: u32 = 3489661234;
308pub const TEE_ATTR_DH_PRIVATE_VALUE: u32 = 3221226034;
309pub const TEE_ATTR_RSA_OAEP_LABEL: u32 = 3489663280;
310pub const TEE_ATTR_RSA_OAEP_MGF_HASH: u32 = 3489663281;
311pub const TEE_ATTR_RSA_PSS_SALT_LENGTH: u32 = 4026534448;
312pub const TEE_ATTR_ECC_PUBLIC_VALUE_X: u32 = 3489661249;
313pub const TEE_ATTR_ECC_PUBLIC_VALUE_Y: u32 = 3489661505;
314pub const TEE_ATTR_ECC_PRIVATE_VALUE: u32 = 3221226305;
315pub const TEE_ATTR_ECC_EPHEMERAL_PUBLIC_VALUE_X: u32 = 3489661254;
316pub const TEE_ATTR_ECC_EPHEMERAL_PUBLIC_VALUE_Y: u32 = 3489661510;
317pub const TEE_ATTR_ECC_CURVE: u32 = 4026532929;
318pub const TEE_ATTR_EDDSA_CTX: u32 = 3489662531;
319pub const TEE_ATTR_ED25519_PUBLIC_VALUE: u32 = 3489662787;
320pub const TEE_ATTR_ED25519_PRIVATE_VALUE: u32 = 3221227587;
321pub const TEE_ATTR_X25519_PUBLIC_VALUE: u32 = 3489663300;
322pub const TEE_ATTR_X25519_PRIVATE_VALUE: u32 = 3221228100;
323pub const TEE_ATTR_ED448_PUBLIC_VALUE: u32 = 3489660930;
324pub const TEE_ATTR_ED448_PRIVATE_VALUE: u32 = 3221225475;
325pub const TEE_ATTR_EDDSA_PREHASH: u32 = 4026531844;
326pub const TEE_ATTR_X448_PUBLIC_VALUE: u32 = 3489663557;
327pub const TEE_ATTR_X448_PRIVATE_VALUE: u32 = 3221228102;
328pub const TEE_ATTR_SM2_ID_INITIATOR: u32 = 3489662022;
329pub const TEE_ATTR_SM2_ID_RESPONDER: u32 = 3489662278;
330pub const TEE_ATTR_SM2_KEP_USER: u32 = 4026533446;
331pub const TEE_ATTR_SM2_KEP_CONFIRMATION_IN: u32 = 3489662790;
332pub const TEE_ATTR_SM2_KEP_CONFIRMATION_OUT: u32 = 3489663046;
333pub const TEE_ATTR_HKDF_SALT: u32 = 3489663302;
334pub const TEE_ATTR_HKDF_INFO: u32 = 3489663558;
335pub const TEE_ATTR_HKDF_HASH_ALGORITHM: u32 = 4026534726;
336pub const TEE_ATTR_KDF_KEY_SIZE: u32 = 4026534982;
337pub const TEE_ATTR_FLAG_VALUE: u32 = 536870912;
338pub const TEE_ATTR_FLAG_PUBLIC: u32 = 268435456;
339pub const TEE_TIMEOUT_INFINITE: u32 = 4294967295;
340pub const TEE_CORE_API_MAJOR_VERSION: u32 = 1;
341pub const TEE_CORE_API_MINOR_VERSION: u32 = 3;
342pub const TEE_CORE_API_MAINTENANCE_VERSION: u32 = 1;
343pub const TEE_CORE_API_VERSION: u32 = 16974080;
344pub type __intmax_t = ::std::os::raw::c_long;
345pub type intmax_t = __intmax_t;
346pub type TEE_Result = u32;
347#[repr(C)]
348#[derive(Debug, Copy, Clone, PartialEq)]
349pub struct TEE_UUID {
350    pub timeLow: u32,
351    pub timeMid: u16,
352    pub timeHiAndVersion: u16,
353    pub clockSeqAndNode: [u8; 8usize],
354}
355#[repr(C)]
356#[derive(Debug, Copy, Clone, PartialEq)]
357pub struct TEE_Identity {
358    pub login: u32,
359    pub uuid: TEE_UUID,
360}
361#[repr(C)]
362#[derive(Copy, Clone)]
363pub union TEE_Param {
364    pub memref: TEE_Param__bindgen_ty_1,
365    pub value: TEE_Param__bindgen_ty_2,
366}
367#[repr(C)]
368#[derive(Debug, Copy, Clone, PartialEq)]
369pub struct TEE_Param__bindgen_ty_1 {
370    pub buffer: *mut ::std::os::raw::c_void,
371    pub size: usize,
372}
373#[repr(C)]
374#[derive(Debug, Copy, Clone, PartialEq)]
375pub struct TEE_Param__bindgen_ty_2 {
376    pub a: u32,
377    pub b: u32,
378}
379impl ::std::fmt::Debug for TEE_Param {
380    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
381        write!(f, "TEE_Param {{ union }}")
382    }
383}
384#[repr(C)]
385#[derive(Debug, Copy, Clone)]
386pub struct __TEE_TASessionHandle {
387    _unused: [u8; 0],
388}
389pub type TEE_TASessionHandle = *mut __TEE_TASessionHandle;
390#[repr(C)]
391#[derive(Debug, Copy, Clone)]
392pub struct __TEE_PropSetHandle {
393    _unused: [u8; 0],
394}
395pub type TEE_PropSetHandle = *mut __TEE_PropSetHandle;
396#[repr(C)]
397#[derive(Copy, Clone)]
398pub struct TEE_Attribute {
399    pub attributeID: u32,
400    pub __bindgen_padding_0: [u8; 4usize],
401    pub content: TEE_Attribute__bindgen_ty_1,
402}
403#[repr(C)]
404#[derive(Copy, Clone)]
405pub union TEE_Attribute__bindgen_ty_1 {
406    pub ref_: TEE_Attribute__bindgen_ty_1__bindgen_ty_1,
407    pub value: TEE_Attribute__bindgen_ty_1__bindgen_ty_2,
408}
409#[repr(C)]
410#[derive(Debug, Copy, Clone, PartialEq)]
411pub struct TEE_Attribute__bindgen_ty_1__bindgen_ty_1 {
412    pub buffer: *mut ::std::os::raw::c_void,
413    pub length: usize,
414}
415#[repr(C)]
416#[derive(Debug, Copy, Clone, PartialEq)]
417pub struct TEE_Attribute__bindgen_ty_1__bindgen_ty_2 {
418    pub a: u32,
419    pub b: u32,
420}
421impl ::std::fmt::Debug for TEE_Attribute__bindgen_ty_1 {
422    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
423        write!(f, "TEE_Attribute__bindgen_ty_1 {{ union }}")
424    }
425}
426impl ::std::fmt::Debug for TEE_Attribute {
427    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
428        write!(f, "TEE_Attribute {{ content: {:?} }}", self.content)
429    }
430}
431#[repr(C)]
432#[derive(Debug, Copy, Clone, PartialEq)]
433pub struct TEE_ObjectInfo {
434    pub objectType: u32,
435    pub objectSize: u32,
436    pub maxObjectSize: u32,
437    pub objectUsage: u32,
438    pub dataSize: usize,
439    pub dataPosition: usize,
440    pub handleFlags: u32,
441    pub __bindgen_padding_0: [u8; 4usize],
442}
443pub type TEE_Whence = u32;
444#[repr(C)]
445#[derive(Debug, Copy, Clone)]
446pub struct __TEE_ObjectHandle {
447    _unused: [u8; 0],
448}
449pub type TEE_ObjectHandle = *mut __TEE_ObjectHandle;
450#[repr(C)]
451#[derive(Debug, Copy, Clone)]
452pub struct __TEE_ObjectEnumHandle {
453    _unused: [u8; 0],
454}
455pub type TEE_ObjectEnumHandle = *mut __TEE_ObjectEnumHandle;
456pub type TEE_OperationMode = u32;
457#[repr(C)]
458#[derive(Debug, Copy, Clone, PartialEq)]
459pub struct TEE_OperationInfo {
460    pub algorithm: u32,
461    pub operationClass: u32,
462    pub mode: u32,
463    pub digestLength: u32,
464    pub maxKeySize: u32,
465    pub keySize: u32,
466    pub requiredKeyUsage: u32,
467    pub handleState: u32,
468}
469#[repr(C)]
470#[derive(Debug, Copy, Clone, PartialEq)]
471pub struct TEE_OperationInfoKey {
472    pub keySize: u32,
473    pub requiredKeyUsage: u32,
474}
475#[repr(C)]
476#[derive(Debug)]
477pub struct TEE_OperationInfoMultiple {
478    pub algorithm: u32,
479    pub operationClass: u32,
480    pub mode: u32,
481    pub digestLength: u32,
482    pub maxKeySize: u32,
483    pub handleState: u32,
484    pub operationState: u32,
485    pub numberOfKeys: u32,
486    pub keyInformation: __IncompleteArrayField<TEE_OperationInfoKey>,
487}
488#[repr(C)]
489#[derive(Debug, Copy, Clone)]
490pub struct __TEE_OperationHandle {
491    _unused: [u8; 0],
492}
493pub type TEE_OperationHandle = *mut __TEE_OperationHandle;
494#[repr(C)]
495#[derive(Debug, Copy, Clone, PartialEq)]
496pub struct TEE_Time {
497    pub seconds: u32,
498    pub millis: u32,
499}
500pub type TEE_BigInt = u32;
501pub type TEE_BigIntFMMContext = u32;
502pub type TEE_BigIntFMM = u32;
503extern "C" {
504    pub fn TA_CreateEntryPoint() -> TEE_Result;
505}
506extern "C" {
507    pub fn TA_DestroyEntryPoint();
508}
509extern "C" {
510    pub fn TA_OpenSessionEntryPoint(
511        paramTypes: u32,
512        params: *mut TEE_Param,
513        sessionContext: *mut *mut ::std::os::raw::c_void,
514    ) -> TEE_Result;
515}
516extern "C" {
517    pub fn TA_CloseSessionEntryPoint(sessionContext: *mut ::std::os::raw::c_void);
518}
519extern "C" {
520    pub fn TA_InvokeCommandEntryPoint(
521        sessionContext: *mut ::std::os::raw::c_void,
522        commandID: u32,
523        paramTypes: u32,
524        params: *mut TEE_Param,
525    ) -> TEE_Result;
526}
527extern "C" {
528    pub fn TEE_GetPropertyAsString(
529        propsetOrEnumerator: TEE_PropSetHandle,
530        name: *mut ::std::os::raw::c_char,
531        valueBuffer: *mut ::std::os::raw::c_char,
532        valueBufferLen: *mut usize,
533    ) -> TEE_Result;
534}
535extern "C" {
536    pub fn TEE_GetPropertyAsBool(
537        propsetOrEnumerator: TEE_PropSetHandle,
538        name: *mut ::std::os::raw::c_char,
539        value: *mut bool,
540    ) -> TEE_Result;
541}
542extern "C" {
543    pub fn TEE_GetPropertyAsU32(
544        propsetOrEnumerator: TEE_PropSetHandle,
545        name: *mut ::std::os::raw::c_char,
546        value: *mut u32,
547    ) -> TEE_Result;
548}
549extern "C" {
550    pub fn TEE_GetPropertyAsU64(
551        propsetOrEnumerator: TEE_PropSetHandle,
552        name: *mut ::std::os::raw::c_char,
553        value: *mut u64,
554    ) -> TEE_Result;
555}
556extern "C" {
557    pub fn TEE_GetPropertyAsBinaryBlock(
558        propsetOrEnumerator: TEE_PropSetHandle,
559        name: *mut ::std::os::raw::c_char,
560        valueBuffer: *mut ::std::os::raw::c_void,
561        valueBufferLen: *mut usize,
562    ) -> TEE_Result;
563}
564extern "C" {
565    pub fn TEE_GetPropertyAsUUID(
566        propsetOrEnumerator: TEE_PropSetHandle,
567        name: *mut ::std::os::raw::c_char,
568        value: *mut TEE_UUID,
569    ) -> TEE_Result;
570}
571extern "C" {
572    pub fn TEE_GetPropertyAsIdentity(
573        propsetOrEnumerator: TEE_PropSetHandle,
574        name: *mut ::std::os::raw::c_char,
575        value: *mut TEE_Identity,
576    ) -> TEE_Result;
577}
578extern "C" {
579    pub fn TEE_AllocatePropertyEnumerator(enumerator: *mut TEE_PropSetHandle) -> TEE_Result;
580}
581extern "C" {
582    pub fn TEE_FreePropertyEnumerator(enumerator: TEE_PropSetHandle);
583}
584extern "C" {
585    pub fn TEE_StartPropertyEnumerator(enumerator: TEE_PropSetHandle, propSet: TEE_PropSetHandle);
586}
587extern "C" {
588    pub fn TEE_ResetPropertyEnumerator(enumerator: TEE_PropSetHandle);
589}
590extern "C" {
591    pub fn TEE_GetPropertyName(
592        enumerator: TEE_PropSetHandle,
593        nameBuffer: *mut ::std::os::raw::c_void,
594        nameBufferLen: *mut usize,
595    ) -> TEE_Result;
596}
597extern "C" {
598    pub fn TEE_GetNextProperty(enumerator: TEE_PropSetHandle) -> TEE_Result;
599}
600extern "C" {
601    pub fn TEE_Panic(panicCode: TEE_Result) -> !;
602}
603extern "C" {
604    pub fn TEE_OpenTASession(
605        destination: *const TEE_UUID,
606        cancellationRequestTimeout: u32,
607        paramTypes: u32,
608        params: *mut TEE_Param,
609        session: *mut TEE_TASessionHandle,
610        returnOrigin: *mut u32,
611    ) -> TEE_Result;
612}
613extern "C" {
614    pub fn TEE_CloseTASession(session: TEE_TASessionHandle);
615}
616extern "C" {
617    pub fn TEE_InvokeTACommand(
618        session: TEE_TASessionHandle,
619        cancellationRequestTimeout: u32,
620        commandID: u32,
621        paramTypes: u32,
622        params: *mut TEE_Param,
623        returnOrigin: *mut u32,
624    ) -> TEE_Result;
625}
626extern "C" {
627    pub fn TEE_GetCancellationFlag() -> bool;
628}
629extern "C" {
630    pub fn TEE_UnmaskCancellation() -> bool;
631}
632extern "C" {
633    pub fn TEE_MaskCancellation() -> bool;
634}
635extern "C" {
636    pub fn TEE_CheckMemoryAccessRights(
637        accessFlags: u32,
638        buffer: *mut ::std::os::raw::c_void,
639        size: usize,
640    ) -> TEE_Result;
641}
642extern "C" {
643    pub fn TEE_SetInstanceData(instanceData: *mut ::std::os::raw::c_void);
644}
645extern "C" {
646    pub fn TEE_GetInstanceData() -> *mut ::std::os::raw::c_void;
647}
648extern "C" {
649    pub fn TEE_Malloc(size: usize, hint: u32) -> *mut ::std::os::raw::c_void;
650}
651extern "C" {
652    pub fn TEE_Realloc(
653        buffer: *mut ::std::os::raw::c_void,
654        newSize: usize,
655    ) -> *mut ::std::os::raw::c_void;
656}
657extern "C" {
658    pub fn TEE_Free(buffer: *mut ::std::os::raw::c_void);
659}
660extern "C" {
661    pub fn TEE_MemMove(
662        dest: *mut ::std::os::raw::c_void,
663        src: *const ::std::os::raw::c_void,
664        size: usize,
665    );
666}
667extern "C" {
668    pub fn TEE_MemCompare(
669        buffer1: *const ::std::os::raw::c_void,
670        buffer2: *const ::std::os::raw::c_void,
671        size: usize,
672    ) -> i32;
673}
674extern "C" {
675    pub fn TEE_MemFill(buffer: *mut ::std::os::raw::c_void, x: u8, size: usize);
676}
677extern "C" {
678    pub fn TEE_GetObjectInfo1(
679        object: TEE_ObjectHandle,
680        objectInfo: *mut TEE_ObjectInfo,
681    ) -> TEE_Result;
682}
683extern "C" {
684    pub fn TEE_RestrictObjectUsage1(object: TEE_ObjectHandle, objectUsage: u32) -> TEE_Result;
685}
686extern "C" {
687    pub fn TEE_GetObjectBufferAttribute(
688        object: TEE_ObjectHandle,
689        attributeID: u32,
690        buffer: *mut ::std::os::raw::c_void,
691        size: *mut usize,
692    ) -> TEE_Result;
693}
694extern "C" {
695    pub fn TEE_GetObjectValueAttribute(
696        object: TEE_ObjectHandle,
697        attributeID: u32,
698        a: *mut u32,
699        b: *mut u32,
700    ) -> TEE_Result;
701}
702extern "C" {
703    pub fn TEE_CloseObject(object: TEE_ObjectHandle);
704}
705extern "C" {
706    pub fn TEE_AllocateTransientObject(
707        objectType: u32,
708        maxObjectSize: u32,
709        object: *mut TEE_ObjectHandle,
710    ) -> TEE_Result;
711}
712extern "C" {
713    pub fn TEE_FreeTransientObject(object: TEE_ObjectHandle);
714}
715extern "C" {
716    pub fn TEE_ResetTransientObject(object: TEE_ObjectHandle);
717}
718extern "C" {
719    pub fn TEE_PopulateTransientObject(
720        object: TEE_ObjectHandle,
721        attrs: *mut TEE_Attribute,
722        attrCount: u32,
723    ) -> TEE_Result;
724}
725extern "C" {
726    pub fn TEE_InitRefAttribute(
727        attr: *mut TEE_Attribute,
728        attributeID: u32,
729        buffer: *mut ::std::os::raw::c_void,
730        length: usize,
731    );
732}
733extern "C" {
734    pub fn TEE_InitValueAttribute(attr: *mut TEE_Attribute, attributeID: u32, a: u32, b: u32);
735}
736extern "C" {
737    pub fn TEE_CopyObjectAttributes1(
738        destObject: TEE_ObjectHandle,
739        srcObject: TEE_ObjectHandle,
740    ) -> TEE_Result;
741}
742extern "C" {
743    pub fn TEE_GenerateKey(
744        object: TEE_ObjectHandle,
745        keySize: u32,
746        params: *mut TEE_Attribute,
747        paramCount: u32,
748    ) -> TEE_Result;
749}
750extern "C" {
751    pub fn TEE_OpenPersistentObject(
752        storageID: u32,
753        objectID: *mut ::std::os::raw::c_void,
754        objectIDLen: usize,
755        flags: u32,
756        object: *mut TEE_ObjectHandle,
757    ) -> TEE_Result;
758}
759extern "C" {
760    pub fn TEE_CreatePersistentObject(
761        storageID: u32,
762        objectID: *mut ::std::os::raw::c_void,
763        objectIDLen: usize,
764        flags: u32,
765        attributes: TEE_ObjectHandle,
766        initialData: *mut ::std::os::raw::c_void,
767        initialDataLen: usize,
768        object: *mut TEE_ObjectHandle,
769    ) -> TEE_Result;
770}
771extern "C" {
772    pub fn TEE_CloseAndDeletePersistentObject1(object: TEE_ObjectHandle) -> TEE_Result;
773}
774extern "C" {
775    pub fn TEE_RenamePersistentObject(
776        object: TEE_ObjectHandle,
777        newObjectID: *mut ::std::os::raw::c_void,
778        newObjectIDLen: usize,
779    ) -> TEE_Result;
780}
781extern "C" {
782    pub fn TEE_AllocatePersistentObjectEnumerator(
783        objectEnumerator: *mut TEE_ObjectEnumHandle,
784    ) -> TEE_Result;
785}
786extern "C" {
787    pub fn TEE_FreePersistentObjectEnumerator(objectEnumerator: TEE_ObjectEnumHandle);
788}
789extern "C" {
790    pub fn TEE_ResetPersistentObjectEnumerator(objectEnumerator: TEE_ObjectEnumHandle);
791}
792extern "C" {
793    pub fn TEE_StartPersistentObjectEnumerator(
794        objectEnumerator: TEE_ObjectEnumHandle,
795        storageID: u32,
796    ) -> TEE_Result;
797}
798extern "C" {
799    pub fn TEE_GetNextPersistentObject(
800        objectEnumerator: TEE_ObjectEnumHandle,
801        objectInfo: *mut TEE_ObjectInfo,
802        objectID: *mut ::std::os::raw::c_void,
803        objectIDLen: *mut usize,
804    ) -> TEE_Result;
805}
806extern "C" {
807    pub fn TEE_ReadObjectData(
808        object: TEE_ObjectHandle,
809        buffer: *mut ::std::os::raw::c_void,
810        size: usize,
811        count: *mut usize,
812    ) -> TEE_Result;
813}
814extern "C" {
815    pub fn TEE_WriteObjectData(
816        object: TEE_ObjectHandle,
817        buffer: *mut ::std::os::raw::c_void,
818        size: usize,
819    ) -> TEE_Result;
820}
821extern "C" {
822    pub fn TEE_TruncateObjectData(object: TEE_ObjectHandle, size: usize) -> TEE_Result;
823}
824extern "C" {
825    pub fn TEE_SeekObjectData(
826        object: TEE_ObjectHandle,
827        offset: intmax_t,
828        whence: TEE_Whence,
829    ) -> TEE_Result;
830}
831extern "C" {
832    pub fn TEE_AllocateOperation(
833        operation: *mut TEE_OperationHandle,
834        algorithm: u32,
835        mode: u32,
836        maxKeySize: u32,
837    ) -> TEE_Result;
838}
839extern "C" {
840    pub fn TEE_FreeOperation(operation: TEE_OperationHandle);
841}
842extern "C" {
843    pub fn TEE_GetOperationInfo(
844        operation: TEE_OperationHandle,
845        operationInfo: *mut TEE_OperationInfo,
846    );
847}
848extern "C" {
849    pub fn TEE_GetOperationInfoMultiple(
850        operation: TEE_OperationHandle,
851        operationInfoMultiple: *mut TEE_OperationInfoMultiple,
852        operationSize: *mut usize,
853    ) -> TEE_Result;
854}
855extern "C" {
856    pub fn TEE_ResetOperation(operation: TEE_OperationHandle);
857}
858extern "C" {
859    pub fn TEE_SetOperationKey(operation: TEE_OperationHandle, key: TEE_ObjectHandle)
860        -> TEE_Result;
861}
862extern "C" {
863    pub fn TEE_SetOperationKey2(
864        operation: TEE_OperationHandle,
865        key1: TEE_ObjectHandle,
866        key2: TEE_ObjectHandle,
867    ) -> TEE_Result;
868}
869extern "C" {
870    pub fn TEE_CopyOperation(dstOperation: TEE_OperationHandle, srcOperation: TEE_OperationHandle);
871}
872extern "C" {
873    pub fn TEE_IsAlgorithmSupported(algId: u32, element: u32) -> TEE_Result;
874}
875extern "C" {
876    pub fn TEE_DigestUpdate(
877        operation: TEE_OperationHandle,
878        chunk: *mut ::std::os::raw::c_void,
879        chunkSize: usize,
880    );
881}
882extern "C" {
883    pub fn TEE_DigestDoFinal(
884        operation: TEE_OperationHandle,
885        chunk: *mut ::std::os::raw::c_void,
886        chunkLen: usize,
887        hash: *mut ::std::os::raw::c_void,
888        hashLen: *mut usize,
889    ) -> TEE_Result;
890}
891extern "C" {
892    pub fn TEE_DigestExtract(
893        operation: TEE_OperationHandle,
894        hash: *mut ::std::os::raw::c_void,
895        hashLen: *mut usize,
896    ) -> TEE_Result;
897}
898extern "C" {
899    pub fn TEE_CipherInit(
900        operation: TEE_OperationHandle,
901        IV: *mut ::std::os::raw::c_void,
902        IVLen: usize,
903    );
904}
905extern "C" {
906    pub fn TEE_CipherUpdate(
907        operation: TEE_OperationHandle,
908        srcData: *mut ::std::os::raw::c_void,
909        srcLen: usize,
910        destData: *mut ::std::os::raw::c_void,
911        destLen: *mut usize,
912    ) -> TEE_Result;
913}
914extern "C" {
915    pub fn TEE_CipherDoFinal(
916        operation: TEE_OperationHandle,
917        srcData: *mut ::std::os::raw::c_void,
918        srcLen: usize,
919        destData: *mut ::std::os::raw::c_void,
920        destLen: *mut usize,
921    ) -> TEE_Result;
922}
923extern "C" {
924    pub fn TEE_MACInit(
925        operation: TEE_OperationHandle,
926        IV: *mut ::std::os::raw::c_void,
927        IVLen: usize,
928    );
929}
930extern "C" {
931    pub fn TEE_MACUpdate(
932        operation: TEE_OperationHandle,
933        chunk: *mut ::std::os::raw::c_void,
934        chunkSize: usize,
935    );
936}
937extern "C" {
938    pub fn TEE_MACComputeFinal(
939        operation: TEE_OperationHandle,
940        message: *mut ::std::os::raw::c_void,
941        messageLen: usize,
942        mac: *mut ::std::os::raw::c_void,
943        macLen: *mut usize,
944    ) -> TEE_Result;
945}
946extern "C" {
947    pub fn TEE_MACCompareFinal(
948        operation: TEE_OperationHandle,
949        message: *mut ::std::os::raw::c_void,
950        messageLen: usize,
951        mac: *mut ::std::os::raw::c_void,
952        macLen: usize,
953    ) -> TEE_Result;
954}
955extern "C" {
956    pub fn TEE_AEInit(
957        operation: TEE_OperationHandle,
958        nonce: *mut ::std::os::raw::c_void,
959        nonceLen: usize,
960        tagLen: u32,
961        AADLen: usize,
962        payloadLen: usize,
963    ) -> TEE_Result;
964}
965extern "C" {
966    pub fn TEE_AEUpdateAAD(
967        operation: TEE_OperationHandle,
968        AADdata: *mut ::std::os::raw::c_void,
969        AADdataLen: usize,
970    );
971}
972extern "C" {
973    pub fn TEE_AEUpdate(
974        operation: TEE_OperationHandle,
975        srcData: *mut ::std::os::raw::c_void,
976        srcLen: usize,
977        destData: *mut ::std::os::raw::c_void,
978        destLen: *mut usize,
979    ) -> TEE_Result;
980}
981extern "C" {
982    pub fn TEE_AEEncryptFinal(
983        operation: TEE_OperationHandle,
984        srcData: *mut ::std::os::raw::c_void,
985        srcLen: usize,
986        destData: *mut ::std::os::raw::c_void,
987        destLen: *mut usize,
988        tag: *mut ::std::os::raw::c_void,
989        tagLen: *mut usize,
990    ) -> TEE_Result;
991}
992extern "C" {
993    pub fn TEE_AEDecryptFinal(
994        operation: TEE_OperationHandle,
995        srcData: *mut ::std::os::raw::c_void,
996        srcLen: usize,
997        destData: *mut ::std::os::raw::c_void,
998        destLen: *mut usize,
999        tag: *mut ::std::os::raw::c_void,
1000        tagLen: usize,
1001    ) -> TEE_Result;
1002}
1003extern "C" {
1004    pub fn TEE_AsymmetricEncrypt(
1005        operation: TEE_OperationHandle,
1006        params: *mut TEE_Attribute,
1007        paramCount: u32,
1008        srcData: *mut ::std::os::raw::c_void,
1009        srcLen: usize,
1010        destData: *mut ::std::os::raw::c_void,
1011        destLen: *mut usize,
1012    ) -> TEE_Result;
1013}
1014extern "C" {
1015    pub fn TEE_AsymmetricDecrypt(
1016        operation: TEE_OperationHandle,
1017        params: *mut TEE_Attribute,
1018        paramCount: u32,
1019        srcData: *mut ::std::os::raw::c_void,
1020        srcLen: usize,
1021        destData: *mut ::std::os::raw::c_void,
1022        destLen: *mut usize,
1023    ) -> TEE_Result;
1024}
1025extern "C" {
1026    pub fn TEE_AsymmetricSignDigest(
1027        operation: TEE_OperationHandle,
1028        params: *mut TEE_Attribute,
1029        paramCount: u32,
1030        digest: *mut ::std::os::raw::c_void,
1031        digestLen: usize,
1032        signature: *mut ::std::os::raw::c_void,
1033        signatureLen: *mut usize,
1034    ) -> TEE_Result;
1035}
1036extern "C" {
1037    pub fn TEE_AsymmetricVerifyDigest(
1038        operation: TEE_OperationHandle,
1039        params: *mut TEE_Attribute,
1040        paramCount: u32,
1041        digest: *mut ::std::os::raw::c_void,
1042        digestLen: usize,
1043        signature: *mut ::std::os::raw::c_void,
1044        signatureLen: usize,
1045    ) -> TEE_Result;
1046}
1047extern "C" {
1048    pub fn TEE_DeriveKey(
1049        operation: TEE_OperationHandle,
1050        params: *mut TEE_Attribute,
1051        paramCount: u32,
1052        derivedKey: TEE_ObjectHandle,
1053    );
1054}
1055extern "C" {
1056    pub fn TEE_GenerateRandom(randomBuffer: *mut ::std::os::raw::c_void, randomBufferLen: usize);
1057}
1058extern "C" {
1059    pub fn TEE_GetSystemTime(time: *mut TEE_Time);
1060}
1061extern "C" {
1062    pub fn TEE_Wait(timeout: u32) -> TEE_Result;
1063}
1064extern "C" {
1065    pub fn TEE_GetTAPersistentTime(time: *mut TEE_Time) -> TEE_Result;
1066}
1067extern "C" {
1068    pub fn TEE_SetTAPersistentTime(time: *const TEE_Time) -> TEE_Result;
1069}
1070extern "C" {
1071    pub fn TEE_GetREETime(time: *mut TEE_Time);
1072}
1073extern "C" {
1074    pub fn TEE_BigIntFMMContextSizeInU32(modulusSizeInBits: usize) -> usize;
1075}
1076extern "C" {
1077    pub fn TEE_BigIntFMMSizeInU32(modulusSizeInBits: usize) -> usize;
1078}
1079extern "C" {
1080    pub fn TEE_BigIntInit(bigInt: *mut TEE_BigInt, len: usize);
1081}
1082extern "C" {
1083    pub fn TEE_BigIntInitFMMContext1(
1084        context: *mut TEE_BigIntFMMContext,
1085        len: usize,
1086        modulus: *mut TEE_BigInt,
1087    ) -> TEE_Result;
1088}
1089extern "C" {
1090    pub fn TEE_BigIntInitFMM(bigIntFMM: *mut TEE_BigIntFMM, len: usize);
1091}
1092extern "C" {
1093    pub fn TEE_BigIntConvertFromOctetString(
1094        dest: *mut TEE_BigInt,
1095        buffer: *mut u8,
1096        bufferLen: usize,
1097        sign: i32,
1098    ) -> TEE_Result;
1099}
1100extern "C" {
1101    pub fn TEE_BigIntConvertToOctetString(
1102        buffer: *mut ::std::os::raw::c_void,
1103        bufferLen: *mut usize,
1104        bigInt: *mut TEE_BigInt,
1105    ) -> TEE_Result;
1106}
1107extern "C" {
1108    pub fn TEE_BigIntConvertFromS32(dest: *mut TEE_BigInt, shortVal: i32);
1109}
1110extern "C" {
1111    pub fn TEE_BigIntConvertToS32(dest: *mut i32, src: *mut TEE_BigInt) -> TEE_Result;
1112}
1113extern "C" {
1114    pub fn TEE_BigIntCmp(op1: *mut TEE_BigInt, op2: *mut TEE_BigInt) -> i32;
1115}
1116extern "C" {
1117    pub fn TEE_BigIntCmpS32(op: *mut TEE_BigInt, shortVal: i32) -> i32;
1118}
1119extern "C" {
1120    pub fn TEE_BigIntShiftRight(dest: *mut TEE_BigInt, op: *mut TEE_BigInt, bits: usize);
1121}
1122extern "C" {
1123    pub fn TEE_BigIntGetBit(src: *mut TEE_BigInt, bitIndex: u32) -> bool;
1124}
1125extern "C" {
1126    pub fn TEE_BigIntGetBitCount(src: *mut TEE_BigInt) -> u32;
1127}
1128extern "C" {
1129    pub fn TEE_BigIntSetBit(op: *mut TEE_BigInt, bitIndex: u32, value: bool) -> TEE_Result;
1130}
1131extern "C" {
1132    pub fn TEE_BigIntAssign(dest: *mut TEE_BigInt, src: *const TEE_BigInt) -> TEE_Result;
1133}
1134extern "C" {
1135    pub fn TEE_BigIntAbs(dest: *mut TEE_BigInt, src: *const TEE_BigInt) -> TEE_Result;
1136}
1137extern "C" {
1138    pub fn TEE_BigIntAdd(dest: *mut TEE_BigInt, op1: *const TEE_BigInt, op2: *const TEE_BigInt);
1139}
1140extern "C" {
1141    pub fn TEE_BigIntSub(dest: *mut TEE_BigInt, op1: *const TEE_BigInt, op2: *const TEE_BigInt);
1142}
1143extern "C" {
1144    pub fn TEE_BigIntNeg(dest: *mut TEE_BigInt, op: *const TEE_BigInt);
1145}
1146extern "C" {
1147    pub fn TEE_BigIntMul(dest: *mut TEE_BigInt, op1: *const TEE_BigInt, op2: *const TEE_BigInt);
1148}
1149extern "C" {
1150    pub fn TEE_BigIntSquare(dest: *mut TEE_BigInt, op: *const TEE_BigInt);
1151}
1152extern "C" {
1153    pub fn TEE_BigIntDiv(
1154        dest_q: *mut TEE_BigInt,
1155        dest_r: *mut TEE_BigInt,
1156        op1: *const TEE_BigInt,
1157        op2: *const TEE_BigInt,
1158    );
1159}
1160extern "C" {
1161    pub fn TEE_BigIntMod(dest: *mut TEE_BigInt, op: *const TEE_BigInt, n: *const TEE_BigInt);
1162}
1163extern "C" {
1164    pub fn TEE_BigIntAddMod(
1165        dest: *mut TEE_BigInt,
1166        op1: *const TEE_BigInt,
1167        op2: *const TEE_BigInt,
1168        n: *const TEE_BigInt,
1169    );
1170}
1171extern "C" {
1172    pub fn TEE_BigIntSubMod(
1173        dest: *mut TEE_BigInt,
1174        op1: *const TEE_BigInt,
1175        op2: *const TEE_BigInt,
1176        n: *const TEE_BigInt,
1177    );
1178}
1179extern "C" {
1180    pub fn TEE_BigIntMulMod(
1181        dest: *mut TEE_BigInt,
1182        op1: *const TEE_BigInt,
1183        op2: *const TEE_BigInt,
1184        n: *const TEE_BigInt,
1185    );
1186}
1187extern "C" {
1188    pub fn TEE_BigIntSquareMod(dest: *mut TEE_BigInt, op: *const TEE_BigInt, n: *const TEE_BigInt);
1189}
1190extern "C" {
1191    pub fn TEE_BigIntInvMod(dest: *mut TEE_BigInt, op: *const TEE_BigInt, n: *const TEE_BigInt);
1192}
1193extern "C" {
1194    pub fn TEE_BigIntExpMod(
1195        dest: *mut TEE_BigInt,
1196        op1: *mut TEE_BigInt,
1197        op2: *mut TEE_BigInt,
1198        n: *mut TEE_BigInt,
1199        context: *mut TEE_BigIntFMMContext,
1200    ) -> TEE_Result;
1201}
1202extern "C" {
1203    pub fn TEE_BigIntRelativePrime(op1: *mut TEE_BigInt, op2: *mut TEE_BigInt) -> bool;
1204}
1205extern "C" {
1206    pub fn TEE_BigIntComputeExtendedGcd(
1207        gcd: *mut TEE_BigInt,
1208        u: *mut TEE_BigInt,
1209        v: *mut TEE_BigInt,
1210        op1: *mut TEE_BigInt,
1211        op2: *mut TEE_BigInt,
1212    );
1213}
1214extern "C" {
1215    pub fn TEE_BigIntIsProbablePrime(op: *mut TEE_BigInt, confidenceLevel: u32) -> i32;
1216}
1217extern "C" {
1218    pub fn TEE_BigIntConvertToFMM(
1219        dest: *mut TEE_BigIntFMM,
1220        src: *mut TEE_BigInt,
1221        n: *mut TEE_BigInt,
1222        context: *mut TEE_BigIntFMMContext,
1223    );
1224}
1225extern "C" {
1226    pub fn TEE_BigIntConvertFromFMM(
1227        dest: *mut TEE_BigInt,
1228        src: *mut TEE_BigIntFMM,
1229        n: *mut TEE_BigInt,
1230        context: *mut TEE_BigIntFMMContext,
1231    );
1232}
1233extern "C" {
1234    pub fn TEE_BigIntComputeFMM(
1235        dest: *mut TEE_BigIntFMM,
1236        op1: *mut TEE_BigIntFMM,
1237        op2: *mut TEE_BigIntFMM,
1238        n: *mut TEE_BigInt,
1239        context: *mut TEE_BigIntFMMContext,
1240    );
1241}
1242extern "C" {
1243    pub fn TEE_GetObjectInfo(object: TEE_ObjectHandle, objectInfo: *mut TEE_ObjectInfo);
1244}
1245extern "C" {
1246    pub fn TEE_RestrictObjectUsage(object: TEE_ObjectHandle, objectUsage: u32);
1247}
1248extern "C" {
1249    pub fn TEE_CopyObjectAttributes(destObject: TEE_ObjectHandle, srcObject: TEE_ObjectHandle);
1250}
1251extern "C" {
1252    pub fn TEE_CloseAndDeletePersistentObject(object: TEE_ObjectHandle);
1253}
1254extern "C" {
1255    pub fn TEE_BigIntInitFMMContext(
1256        context: *mut TEE_BigIntFMMContext,
1257        len: usize,
1258        modulus: *const TEE_BigInt,
1259    );
1260}