#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(clippy::missing_safety_doc)]
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
pub const TEE_HANDLE_NULL: u32 = 0;
pub const TEE_SUCCESS: u32 = 0;
pub const TEE_ERROR_CORRUPT_OBJECT: u32 = 4027580417;
pub const TEE_ERROR_CORRUPT_OBJECT_2: u32 = 4027580418;
pub const TEE_ERROR_STORAGE_NOT_AVAILABLE: u32 = 4027580419;
pub const TEE_ERROR_STORAGE_NOT_AVAILABLE_2: u32 = 4027580420;
pub const TEE_ERROR_UNSUPPORTED_VERSION: u32 = 4027580421;
pub const TEE_ERROR_CIPHERTEXT_INVALID: u32 = 4027580422;
pub const TEE_ERROR_GENERIC: u32 = 4294901760;
pub const TEE_ERROR_ACCESS_DENIED: u32 = 4294901761;
pub const TEE_ERROR_CANCEL: u32 = 4294901762;
pub const TEE_ERROR_ACCESS_CONFLICT: u32 = 4294901763;
pub const TEE_ERROR_EXCESS_DATA: u32 = 4294901764;
pub const TEE_ERROR_BAD_FORMAT: u32 = 4294901765;
pub const TEE_ERROR_BAD_PARAMETERS: u32 = 4294901766;
pub const TEE_ERROR_BAD_STATE: u32 = 4294901767;
pub const TEE_ERROR_ITEM_NOT_FOUND: u32 = 4294901768;
pub const TEE_ERROR_NOT_IMPLEMENTED: u32 = 4294901769;
pub const TEE_ERROR_NOT_SUPPORTED: u32 = 4294901770;
pub const TEE_ERROR_NO_DATA: u32 = 4294901771;
pub const TEE_ERROR_OUT_OF_MEMORY: u32 = 4294901772;
pub const TEE_ERROR_BUSY: u32 = 4294901773;
pub const TEE_ERROR_COMMUNICATION: u32 = 4294901774;
pub const TEE_ERROR_SECURITY: u32 = 4294901775;
pub const TEE_ERROR_SHORT_BUFFER: u32 = 4294901776;
pub const TEE_ERROR_EXTERNAL_CANCEL: u32 = 4294901777;
pub const TEE_ERROR_TIMEOUT: u32 = 4294914049;
pub const TEE_ERROR_OVERFLOW: u32 = 4294914063;
pub const TEE_ERROR_TARGET_DEAD: u32 = 4294914084;
pub const TEE_ERROR_STORAGE_NO_SPACE: u32 = 4294914113;
pub const TEE_ERROR_MAC_INVALID: u32 = 4294914161;
pub const TEE_ERROR_SIGNATURE_INVALID: u32 = 4294914162;
pub const TEE_ERROR_TIME_NOT_SET: u32 = 4294922240;
pub const TEE_ERROR_TIME_NEEDS_RESET: u32 = 4294922241;
pub const TEE_PARAM_TYPE_NONE: u32 = 0;
pub const TEE_PARAM_TYPE_VALUE_INPUT: u32 = 1;
pub const TEE_PARAM_TYPE_VALUE_OUTPUT: u32 = 2;
pub const TEE_PARAM_TYPE_VALUE_INOUT: u32 = 3;
pub const TEE_PARAM_TYPE_MEMREF_INPUT: u32 = 5;
pub const TEE_PARAM_TYPE_MEMREF_OUTPUT: u32 = 6;
pub const TEE_PARAM_TYPE_MEMREF_INOUT: u32 = 7;
pub const TEE_LOGIN_PUBLIC: u32 = 0;
pub const TEE_LOGIN_USER: u32 = 1;
pub const TEE_LOGIN_GROUP: u32 = 2;
pub const TEE_LOGIN_APPLICATION: u32 = 4;
pub const TEE_LOGIN_APPLICATION_USER: u32 = 5;
pub const TEE_LOGIN_APPLICATION_GROUP: u32 = 6;
pub const TEE_LOGIN_TRUSTED_APP: u32 = 4026531840;
pub const TEE_ORIGIN_API: u32 = 1;
pub const TEE_ORIGIN_COMMS: u32 = 2;
pub const TEE_ORIGIN_TEE: u32 = 3;
pub const TEE_ORIGIN_TRUSTED_APP: u32 = 4;
pub const TEE_MEMORY_ACCESS_READ: u32 = 1;
pub const TEE_MEMORY_ACCESS_WRITE: u32 = 2;
pub const TEE_MEMORY_ACCESS_ANY_OWNER: u32 = 4;
pub const TEE_DATA_SEEK_SET: u32 = 0;
pub const TEE_DATA_SEEK_CUR: u32 = 1;
pub const TEE_DATA_SEEK_END: u32 = 2;
pub const TEE_WHENCE_ILLEGAL_VALUE: u32 = 2147483647;
pub const TEE_STORAGE_PRIVATE: u32 = 1;
pub const TEE_STORAGE_PERSO: u32 = 2;
pub const TEE_STORAGE_PROTECTED: u32 = 3;
pub const TEE_STORAGE_ILLEGAL_VALUE: u32 = 2147483647;
pub const TEE_DATA_FLAG_ACCESS_READ: u32 = 1;
pub const TEE_DATA_FLAG_ACCESS_WRITE: u32 = 2;
pub const TEE_DATA_FLAG_ACCESS_WRITE_META: u32 = 4;
pub const TEE_DATA_FLAG_SHARE_READ: u32 = 16;
pub const TEE_DATA_FLAG_SHARE_WRITE: u32 = 32;
pub const TEE_DATA_FLAG_OVERWRITE: u32 = 1024;
pub const TEE_DATA_FLAG_EXCLUSIVE: u32 = 1024;
pub const TEE_USAGE_EXTRACTABLE: u32 = 1;
pub const TEE_USAGE_ENCRYPT: u32 = 2;
pub const TEE_USAGE_DECRYPT: u32 = 4;
pub const TEE_USAGE_MAC: u32 = 8;
pub const TEE_USAGE_SIGN: u32 = 16;
pub const TEE_USAGE_VERIFY: u32 = 32;
pub const TEE_USAGE_DERIVE: u32 = 64;
pub const TEE_DATA_MAX_POSITION: u32 = 4294967295;
pub const TEE_OBJECT_ID_MAX_LEN: u32 = 64;
pub const TEE_HANDLE_FLAG_PERSISTENT: u32 = 65536;
pub const TEE_HANDLE_FLAG_INITIALIZED: u32 = 131072;
pub const TEE_HANDLE_FLAG_KEY_SET: u32 = 262144;
pub const TEE_HANDLE_FLAG_EXPECT_TWO_KEYS: u32 = 524288;
pub const TEE_HANDLE_FLAG_EXTRACTING: u32 = 1048576;
pub const TEE_OPERATION_CIPHER: u32 = 1;
pub const TEE_OPERATION_MAC: u32 = 3;
pub const TEE_OPERATION_AE: u32 = 4;
pub const TEE_OPERATION_DIGEST: u32 = 5;
pub const TEE_OPERATION_ASYMMETRIC_CIPHER: u32 = 6;
pub const TEE_OPERATION_ASYMMETRIC_SIGNATURE: u32 = 7;
pub const TEE_OPERATION_KEY_DERIVATION: u32 = 8;
pub const TEE_OPERATION_STATE_INITIAL: u32 = 0;
pub const TEE_OPERATION_STATE_ACTIVE: u32 = 1;
pub const TEE_OPERATION_STATE_EXTRACTING: u32 = 2;
pub const TEE_MODE_ENCRYPT: u32 = 0;
pub const TEE_MODE_DECRYPT: u32 = 1;
pub const TEE_MODE_SIGN: u32 = 2;
pub const TEE_MODE_VERIFY: u32 = 3;
pub const TEE_MODE_MAC: u32 = 4;
pub const TEE_MODE_DIGEST: u32 = 5;
pub const TEE_MODE_DERIVE: u32 = 6;
pub const TEE_MODE_ILLEGAL_VALUE: u32 = 2147483647;
pub const TEE_ALG_AES_ECB_NOPAD: u32 = 268435472;
pub const TEE_ALG_AES_CBC_NOPAD: u32 = 268435728;
pub const TEE_ALG_AES_CTR: u32 = 268435984;
pub const TEE_ALG_AES_CTS: u32 = 268436240;
pub const TEE_ALG_AES_XTS: u32 = 268436496;
pub const TEE_ALG_AES_CBC_MAC_NOPAD: u32 = 805306640;
pub const TEE_ALG_AES_CBC_MAC_PKCS5: u32 = 805307664;
pub const TEE_ALG_AES_CMAC: u32 = 805307920;
pub const TEE_ALG_AES_CCM: u32 = 1073743632;
pub const TEE_ALG_AES_GCM: u32 = 1073743888;
pub const TEE_ALG_DES_ECB_NOPAD: u32 = 268435473;
pub const TEE_ALG_DES_CBC_NOPAD: u32 = 268435729;
pub const TEE_ALG_DES_CBC_MAC_NOPAD: u32 = 805306641;
pub const TEE_ALG_DES_CBC_MAC_PKCS5: u32 = 805307665;
pub const TEE_ALG_DES3_ECB_NOPAD: u32 = 268435475;
pub const TEE_ALG_DES3_CBC_NOPAD: u32 = 268435731;
pub const TEE_ALG_DES3_CBC_MAC_NOPAD: u32 = 805306643;
pub const TEE_ALG_DES3_CBC_MAC_PKCS5: u32 = 805307667;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_MD5: u32 = 1879054384;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA1: u32 = 1879058480;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA224: u32 = 1879062576;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA256: u32 = 1879066672;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA384: u32 = 1879070768;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA512: u32 = 1879074864;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_224: u32 = 1879083056;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_256: u32 = 1879087152;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_384: u32 = 1879091248;
pub const TEE_ALG_RSASSA_PKCS1_V1_5_SHA3_512: u32 = 1879095344;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA1: u32 = 1881221424;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA224: u32 = 1882274096;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256: u32 = 1883326768;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA384: u32 = 1884379440;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA512: u32 = 1885432112;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_224: u32 = 1887537456;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_256: u32 = 1888590128;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_384: u32 = 1889642800;
pub const TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA3_512: u32 = 1890695472;
pub const TEE_ALG_RSAES_PKCS1_V1_5: u32 = 1610613040;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA1: u32 = 1612775984;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA224: u32 = 1613824560;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256: u32 = 1614873136;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA384: u32 = 1615921712;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA512: u32 = 1616970288;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_224: u32 = 1619067440;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_256: u32 = 1620116016;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_384: u32 = 1621164592;
pub const TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA3_512: u32 = 1622213168;
pub const TEE_ALG_RSA_NOPAD: u32 = 1610612784;
pub const TEE_ALG_DSA_SHA1: u32 = 1879056689;
pub const TEE_ALG_DSA_SHA224: u32 = 1879060785;
pub const TEE_ALG_DSA_SHA256: u32 = 1879064881;
pub const TEE_ALG_DSA_SHA3_224: u32 = 1879081265;
pub const TEE_ALG_DSA_SHA3_256: u32 = 1879085361;
pub const TEE_ALG_DSA_SHA3_384: u32 = 1879089457;
pub const TEE_ALG_DSA_SHA3_512: u32 = 1879093553;
pub const TEE_ALG_DH_DERIVE_SHARED_SECRET: u32 = 2147483698;
pub const TEE_ALG_MD5: u32 = 1342177281;
pub const TEE_ALG_SHA1: u32 = 1342177282;
pub const TEE_ALG_SHA224: u32 = 1342177283;
pub const TEE_ALG_SHA256: u32 = 1342177284;
pub const TEE_ALG_SHA384: u32 = 1342177285;
pub const TEE_ALG_SHA512: u32 = 1342177286;
pub const TEE_ALG_SHA3_224: u32 = 1342177288;
pub const TEE_ALG_SHA3_256: u32 = 1342177289;
pub const TEE_ALG_SHA3_384: u32 = 1342177290;
pub const TEE_ALG_SHA3_512: u32 = 1342177291;
pub const TEE_ALG_HMAC_MD5: u32 = 805306369;
pub const TEE_ALG_HMAC_SHA1: u32 = 805306370;
pub const TEE_ALG_HMAC_SHA224: u32 = 805306371;
pub const TEE_ALG_HMAC_SHA256: u32 = 805306372;
pub const TEE_ALG_HMAC_SHA384: u32 = 805306373;
pub const TEE_ALG_HMAC_SHA512: u32 = 805306374;
pub const TEE_ALG_HMAC_SHA3_224: u32 = 805306376;
pub const TEE_ALG_HMAC_SHA3_256: u32 = 805306377;
pub const TEE_ALG_HMAC_SHA3_384: u32 = 805306378;
pub const TEE_ALG_HMAC_SHA3_512: u32 = 805306379;
pub const TEE_ALG_HKDF: u32 = 2147483719;
pub const TEE_ALG_SHAKE128: u32 = 1342177537;
pub const TEE_ALG_SHAKE256: u32 = 1342177538;
pub const TEE_ALG_ILLEGAL_VALUE: u32 = 4026531839;
pub const TEE_TYPE_AES: u32 = 2684354576;
pub const TEE_TYPE_DES: u32 = 2684354577;
pub const TEE_TYPE_DES3: u32 = 2684354579;
pub const TEE_TYPE_HMAC_MD5: u32 = 2684354561;
pub const TEE_TYPE_HMAC_SHA1: u32 = 2684354562;
pub const TEE_TYPE_HMAC_SHA224: u32 = 2684354563;
pub const TEE_TYPE_HMAC_SHA256: u32 = 2684354564;
pub const TEE_TYPE_HMAC_SHA384: u32 = 2684354565;
pub const TEE_TYPE_HMAC_SHA512: u32 = 2684354566;
pub const TEE_TYPE_HMAC_SM3: u32 = 2684354567;
pub const TEE_TYPE_HMAC_SHA3_224: u32 = 2684354568;
pub const TEE_TYPE_HMAC_SHA3_256: u32 = 2684354569;
pub const TEE_TYPE_HMAC_SHA3_384: u32 = 2684354570;
pub const TEE_TYPE_HMAC_SHA3_512: u32 = 2684354571;
pub const TEE_TYPE_RSA_PUBLIC_KEY: u32 = 2684354608;
pub const TEE_TYPE_RSA_KEYPAIR: u32 = 2701131824;
pub const TEE_TYPE_DSA_PUBLIC_KEY: u32 = 2684354609;
pub const TEE_TYPE_DSA_KEYPAIR: u32 = 2701131825;
pub const TEE_TYPE_DH_KEYPAIR: u32 = 2701131826;
pub const TEE_TYPE_ECDSA_PUBLIC_KEY: u32 = 2684354625;
pub const TEE_TYPE_ECDSA_KEYPAIR: u32 = 2701131841;
pub const TEE_TYPE_ECDH_PUBLIC_KEY: u32 = 2684354626;
pub const TEE_TYPE_ECDH_KEYPAIR: u32 = 2701131842;
pub const TEE_TYPE_ED25519_PUBLIC_KEY: u32 = 2684354627;
pub const TEE_TYPE_ED25519_KEYPAIR: u32 = 2701131843;
pub const TEE_TYPE_X25519_PUBLIC_KEY: u32 = 2684354628;
pub const TEE_TYPE_X25519_KEYPAIR: u32 = 2701131844;
pub const TEE_TYPE_SM2_DSA_PUBLIC_KEY: u32 = 2684354629;
pub const TEE_TYPE_SM2_DSA_KEYPAIR: u32 = 2701131845;
pub const TEE_TYPE_SM2_KEP_PUBLIC_KEY: u32 = 2684354630;
pub const TEE_TYPE_SM2_KEP_KEYPAIR: u32 = 2701131846;
pub const TEE_TYPE_SM2_PKE_PUBLIC_KEY: u32 = 2684354631;
pub const TEE_TYPE_SM2_PKE_KEYPAIR: u32 = 2701131847;
pub const TEE_TYPE_SM4: u32 = 2684354580;
pub const TEE_TYPE_HKDF: u32 = 2684354634;
pub const TEE_TYPE_GENERIC_SECRET: u32 = 2684354560;
pub const TEE_TYPE_CORRUPTED_OBJECT: u32 = 2684354750;
pub const TEE_TYPE_DATA: u32 = 2684354751;
pub const TEE_TYPE_ILLEGAL_VALUE: u32 = 4026531839;
pub const TEE_CRYPTO_ELEMENT_NONE: u32 = 0;
pub const TEE_ECC_CURVE_NIST_P192: u32 = 1;
pub const TEE_ECC_CURVE_NIST_P224: u32 = 2;
pub const TEE_ECC_CURVE_NIST_P256: u32 = 3;
pub const TEE_ECC_CURVE_NIST_P384: u32 = 4;
pub const TEE_ECC_CURVE_NIST_P521: u32 = 5;
pub const TEE_ECC_CURVE_BSI_P160r1: u32 = 257;
pub const TEE_ECC_CURVE_BSI_P192r1: u32 = 258;
pub const TEE_ECC_CURVE_BSI_P224r1: u32 = 259;
pub const TEE_ECC_CURVE_BSI_P256r1: u32 = 260;
pub const TEE_ECC_CURVE_BSI_P320r1: u32 = 261;
pub const TEE_ECC_CURVE_BSI_P384r1: u32 = 262;
pub const TEE_ECC_CURVE_BSI_P512r1: u32 = 263;
pub const TEE_ECC_CURVE_BSI_P160t1: u32 = 513;
pub const TEE_ECC_CURVE_BSI_P192t1: u32 = 514;
pub const TEE_ECC_CURVE_BSI_P224t1: u32 = 515;
pub const TEE_ECC_CURVE_BSI_P256t1: u32 = 516;
pub const TEE_ECC_CURVE_BSI_P320t1: u32 = 517;
pub const TEE_ECC_CURVE_BSI_P384t1: u32 = 518;
pub const TEE_ECC_CURVE_BSI_P512t1: u32 = 519;
pub const TEE_ECC_CURVE_25519: u32 = 768;
pub const TEE_ECC_CURVE_448: u32 = 769;
pub const TEE_ECC_CURVE_SM2: u32 = 768;
pub const TEE_ATTR_SECRET_VALUE: u32 = 3221225472;
pub const TEE_ATTR_RSA_MODULUS: u32 = 3489661232;
pub const TEE_ATTR_RSA_PUBLIC_EXPONENT: u32 = 3489661488;
pub const TEE_ATTR_RSA_PRIVATE_EXPONENT: u32 = 3221226288;
pub const TEE_ATTR_RSA_PRIME1: u32 = 3221226544;
pub const TEE_ATTR_RSA_PRIME2: u32 = 3221226800;
pub const TEE_ATTR_RSA_EXPONENT1: u32 = 3221227056;
pub const TEE_ATTR_RSA_EXPONENT2: u32 = 3221227312;
pub const TEE_ATTR_RSA_COEFFICIENT: u32 = 3221227568;
pub const TEE_ATTR_DSA_PRIME: u32 = 3489665073;
pub const TEE_ATTR_DSA_SUBPRIME: u32 = 3489665329;
pub const TEE_ATTR_DSA_BASE: u32 = 3489665585;
pub const TEE_ATTR_DSA_PUBLIC_VALUE: u32 = 3489661233;
pub const TEE_ATTR_DSA_PRIVATE_VALUE: u32 = 3221226033;
pub const TEE_ATTR_DH_PRIME: u32 = 3489665074;
pub const TEE_ATTR_DH_SUBPRIME: u32 = 3489665330;
pub const TEE_ATTR_DH_BASE: u32 = 3489665586;
pub const TEE_ATTR_DH_X_BITS: u32 = 4026536754;
pub const TEE_ATTR_DH_PUBLIC_VALUE: u32 = 3489661234;
pub const TEE_ATTR_DH_PRIVATE_VALUE: u32 = 3221226034;
pub const TEE_ATTR_RSA_OAEP_LABEL: u32 = 3489663280;
pub const TEE_ATTR_RSA_OAEP_MGF_HASH: u32 = 3489663281;
pub const TEE_ATTR_RSA_PSS_SALT_LENGTH: u32 = 4026534448;
pub const TEE_ATTR_ECC_PUBLIC_VALUE_X: u32 = 3489661249;
pub const TEE_ATTR_ECC_PUBLIC_VALUE_Y: u32 = 3489661505;
pub const TEE_ATTR_ECC_PRIVATE_VALUE: u32 = 3221226305;
pub const TEE_ATTR_ECC_EPHEMERAL_PUBLIC_VALUE_X: u32 = 3489661254;
pub const TEE_ATTR_ECC_EPHEMERAL_PUBLIC_VALUE_Y: u32 = 3489661510;
pub const TEE_ATTR_ECC_CURVE: u32 = 4026532929;
pub const TEE_ATTR_EDDSA_CTX: u32 = 3489662531;
pub const TEE_ATTR_ED25519_PUBLIC_VALUE: u32 = 3489662787;
pub const TEE_ATTR_ED25519_PRIVATE_VALUE: u32 = 3221227587;
pub const TEE_ATTR_X25519_PUBLIC_VALUE: u32 = 3489663300;
pub const TEE_ATTR_X25519_PRIVATE_VALUE: u32 = 3221228100;
pub const TEE_ATTR_ED448_PUBLIC_VALUE: u32 = 3489660930;
pub const TEE_ATTR_ED448_PRIVATE_VALUE: u32 = 3221225475;
pub const TEE_ATTR_EDDSA_PREHASH: u32 = 4026531844;
pub const TEE_ATTR_X448_PUBLIC_VALUE: u32 = 3489663557;
pub const TEE_ATTR_X448_PRIVATE_VALUE: u32 = 3221228102;
pub const TEE_ATTR_SM2_ID_INITIATOR: u32 = 3489662022;
pub const TEE_ATTR_SM2_ID_RESPONDER: u32 = 3489662278;
pub const TEE_ATTR_SM2_KEP_USER: u32 = 4026533446;
pub const TEE_ATTR_SM2_KEP_CONFIRMATION_IN: u32 = 3489662790;
pub const TEE_ATTR_SM2_KEP_CONFIRMATION_OUT: u32 = 3489663046;
pub const TEE_ATTR_HKDF_SALT: u32 = 3489663302;
pub const TEE_ATTR_HKDF_INFO: u32 = 3489663558;
pub const TEE_ATTR_HKDF_HASH_ALGORITHM: u32 = 4026534726;
pub const TEE_ATTR_KDF_KEY_SIZE: u32 = 4026534982;
pub const TEE_ATTR_FLAG_VALUE: u32 = 536870912;
pub const TEE_ATTR_FLAG_PUBLIC: u32 = 268435456;
pub const TEE_TIMEOUT_INFINITE: u32 = 4294967295;
pub const TEE_CORE_API_MAJOR_VERSION: u32 = 1;
pub const TEE_CORE_API_MINOR_VERSION: u32 = 3;
pub const TEE_CORE_API_MAINTENANCE_VERSION: u32 = 1;
pub const TEE_CORE_API_VERSION: u32 = 16974080;
pub type __intmax_t = ::std::os::raw::c_long;
pub type intmax_t = __intmax_t;
pub type TEE_Result = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_UUID {
pub timeLow: u32,
pub timeMid: u16,
pub timeHiAndVersion: u16,
pub clockSeqAndNode: [u8; 8usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_Identity {
pub login: u32,
pub uuid: TEE_UUID,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TEE_Param {
pub memref: TEE_Param__bindgen_ty_1,
pub value: TEE_Param__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_Param__bindgen_ty_1 {
pub buffer: *mut ::std::os::raw::c_void,
pub size: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_Param__bindgen_ty_2 {
pub a: u32,
pub b: u32,
}
impl ::std::fmt::Debug for TEE_Param {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "TEE_Param {{ union }}")
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __TEE_TASessionHandle {
_unused: [u8; 0],
}
pub type TEE_TASessionHandle = *mut __TEE_TASessionHandle;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __TEE_PropSetHandle {
_unused: [u8; 0],
}
pub type TEE_PropSetHandle = *mut __TEE_PropSetHandle;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct TEE_Attribute {
pub attributeID: u32,
pub __bindgen_padding_0: [u8; 4usize],
pub content: TEE_Attribute__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union TEE_Attribute__bindgen_ty_1 {
pub ref_: TEE_Attribute__bindgen_ty_1__bindgen_ty_1,
pub value: TEE_Attribute__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_Attribute__bindgen_ty_1__bindgen_ty_1 {
pub buffer: *mut ::std::os::raw::c_void,
pub length: usize,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_Attribute__bindgen_ty_1__bindgen_ty_2 {
pub a: u32,
pub b: u32,
}
impl ::std::fmt::Debug for TEE_Attribute__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "TEE_Attribute__bindgen_ty_1 {{ union }}")
}
}
impl ::std::fmt::Debug for TEE_Attribute {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "TEE_Attribute {{ content: {:?} }}", self.content)
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_ObjectInfo {
pub objectType: u32,
pub objectSize: u32,
pub maxObjectSize: u32,
pub objectUsage: u32,
pub dataSize: usize,
pub dataPosition: usize,
pub handleFlags: u32,
pub __bindgen_padding_0: [u8; 4usize],
}
pub type TEE_Whence = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __TEE_ObjectHandle {
_unused: [u8; 0],
}
pub type TEE_ObjectHandle = *mut __TEE_ObjectHandle;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __TEE_ObjectEnumHandle {
_unused: [u8; 0],
}
pub type TEE_ObjectEnumHandle = *mut __TEE_ObjectEnumHandle;
pub type TEE_OperationMode = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_OperationInfo {
pub algorithm: u32,
pub operationClass: u32,
pub mode: u32,
pub digestLength: u32,
pub maxKeySize: u32,
pub keySize: u32,
pub requiredKeyUsage: u32,
pub handleState: u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_OperationInfoKey {
pub keySize: u32,
pub requiredKeyUsage: u32,
}
#[repr(C)]
#[derive(Debug)]
pub struct TEE_OperationInfoMultiple {
pub algorithm: u32,
pub operationClass: u32,
pub mode: u32,
pub digestLength: u32,
pub maxKeySize: u32,
pub handleState: u32,
pub operationState: u32,
pub numberOfKeys: u32,
pub keyInformation: __IncompleteArrayField<TEE_OperationInfoKey>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __TEE_OperationHandle {
_unused: [u8; 0],
}
pub type TEE_OperationHandle = *mut __TEE_OperationHandle;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct TEE_Time {
pub seconds: u32,
pub millis: u32,
}
pub type TEE_BigInt = u32;
pub type TEE_BigIntFMMContext = u32;
pub type TEE_BigIntFMM = u32;
extern "C" {
pub fn TA_CreateEntryPoint() -> TEE_Result;
}
extern "C" {
pub fn TA_DestroyEntryPoint();
}
extern "C" {
pub fn TA_OpenSessionEntryPoint(
paramTypes: u32,
params: *mut TEE_Param,
sessionContext: *mut *mut ::std::os::raw::c_void,
) -> TEE_Result;
}
extern "C" {
pub fn TA_CloseSessionEntryPoint(sessionContext: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn TA_InvokeCommandEntryPoint(
sessionContext: *mut ::std::os::raw::c_void,
commandID: u32,
paramTypes: u32,
params: *mut TEE_Param,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsString(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
valueBuffer: *mut ::std::os::raw::c_char,
valueBufferLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsBool(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
value: *mut bool,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsU32(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
value: *mut u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsU64(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
value: *mut u64,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsBinaryBlock(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
valueBuffer: *mut ::std::os::raw::c_void,
valueBufferLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsUUID(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
value: *mut TEE_UUID,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetPropertyAsIdentity(
propsetOrEnumerator: TEE_PropSetHandle,
name: *mut ::std::os::raw::c_char,
value: *mut TEE_Identity,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AllocatePropertyEnumerator(enumerator: *mut TEE_PropSetHandle) -> TEE_Result;
}
extern "C" {
pub fn TEE_FreePropertyEnumerator(enumerator: TEE_PropSetHandle);
}
extern "C" {
pub fn TEE_StartPropertyEnumerator(enumerator: TEE_PropSetHandle, propSet: TEE_PropSetHandle);
}
extern "C" {
pub fn TEE_ResetPropertyEnumerator(enumerator: TEE_PropSetHandle);
}
extern "C" {
pub fn TEE_GetPropertyName(
enumerator: TEE_PropSetHandle,
nameBuffer: *mut ::std::os::raw::c_void,
nameBufferLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetNextProperty(enumerator: TEE_PropSetHandle) -> TEE_Result;
}
extern "C" {
pub fn TEE_Panic(panicCode: TEE_Result) -> !;
}
extern "C" {
pub fn TEE_OpenTASession(
destination: *const TEE_UUID,
cancellationRequestTimeout: u32,
paramTypes: u32,
params: *mut TEE_Param,
session: *mut TEE_TASessionHandle,
returnOrigin: *mut u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CloseTASession(session: TEE_TASessionHandle);
}
extern "C" {
pub fn TEE_InvokeTACommand(
session: TEE_TASessionHandle,
cancellationRequestTimeout: u32,
commandID: u32,
paramTypes: u32,
params: *mut TEE_Param,
returnOrigin: *mut u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetCancellationFlag() -> bool;
}
extern "C" {
pub fn TEE_UnmaskCancellation() -> bool;
}
extern "C" {
pub fn TEE_MaskCancellation() -> bool;
}
extern "C" {
pub fn TEE_CheckMemoryAccessRights(
accessFlags: u32,
buffer: *mut ::std::os::raw::c_void,
size: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_SetInstanceData(instanceData: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn TEE_GetInstanceData() -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn TEE_Malloc(size: usize, hint: u32) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn TEE_Realloc(
buffer: *mut ::std::os::raw::c_void,
newSize: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn TEE_Free(buffer: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn TEE_MemMove(
dest: *mut ::std::os::raw::c_void,
src: *const ::std::os::raw::c_void,
size: usize,
);
}
extern "C" {
pub fn TEE_MemCompare(
buffer1: *const ::std::os::raw::c_void,
buffer2: *const ::std::os::raw::c_void,
size: usize,
) -> i32;
}
extern "C" {
pub fn TEE_MemFill(buffer: *mut ::std::os::raw::c_void, x: u8, size: usize);
}
extern "C" {
pub fn TEE_GetObjectInfo1(
object: TEE_ObjectHandle,
objectInfo: *mut TEE_ObjectInfo,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_RestrictObjectUsage1(object: TEE_ObjectHandle, objectUsage: u32) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetObjectBufferAttribute(
object: TEE_ObjectHandle,
attributeID: u32,
buffer: *mut ::std::os::raw::c_void,
size: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetObjectValueAttribute(
object: TEE_ObjectHandle,
attributeID: u32,
a: *mut u32,
b: *mut u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CloseObject(object: TEE_ObjectHandle);
}
extern "C" {
pub fn TEE_AllocateTransientObject(
objectType: u32,
maxObjectSize: u32,
object: *mut TEE_ObjectHandle,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_FreeTransientObject(object: TEE_ObjectHandle);
}
extern "C" {
pub fn TEE_ResetTransientObject(object: TEE_ObjectHandle);
}
extern "C" {
pub fn TEE_PopulateTransientObject(
object: TEE_ObjectHandle,
attrs: *mut TEE_Attribute,
attrCount: u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_InitRefAttribute(
attr: *mut TEE_Attribute,
attributeID: u32,
buffer: *mut ::std::os::raw::c_void,
length: usize,
);
}
extern "C" {
pub fn TEE_InitValueAttribute(attr: *mut TEE_Attribute, attributeID: u32, a: u32, b: u32);
}
extern "C" {
pub fn TEE_CopyObjectAttributes1(
destObject: TEE_ObjectHandle,
srcObject: TEE_ObjectHandle,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GenerateKey(
object: TEE_ObjectHandle,
keySize: u32,
params: *mut TEE_Attribute,
paramCount: u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_OpenPersistentObject(
storageID: u32,
objectID: *mut ::std::os::raw::c_void,
objectIDLen: usize,
flags: u32,
object: *mut TEE_ObjectHandle,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CreatePersistentObject(
storageID: u32,
objectID: *mut ::std::os::raw::c_void,
objectIDLen: usize,
flags: u32,
attributes: TEE_ObjectHandle,
initialData: *mut ::std::os::raw::c_void,
initialDataLen: usize,
object: *mut TEE_ObjectHandle,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CloseAndDeletePersistentObject1(object: TEE_ObjectHandle) -> TEE_Result;
}
extern "C" {
pub fn TEE_RenamePersistentObject(
object: TEE_ObjectHandle,
newObjectID: *mut ::std::os::raw::c_void,
newObjectIDLen: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AllocatePersistentObjectEnumerator(
objectEnumerator: *mut TEE_ObjectEnumHandle,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_FreePersistentObjectEnumerator(objectEnumerator: TEE_ObjectEnumHandle);
}
extern "C" {
pub fn TEE_ResetPersistentObjectEnumerator(objectEnumerator: TEE_ObjectEnumHandle);
}
extern "C" {
pub fn TEE_StartPersistentObjectEnumerator(
objectEnumerator: TEE_ObjectEnumHandle,
storageID: u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetNextPersistentObject(
objectEnumerator: TEE_ObjectEnumHandle,
objectInfo: *mut TEE_ObjectInfo,
objectID: *mut ::std::os::raw::c_void,
objectIDLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_ReadObjectData(
object: TEE_ObjectHandle,
buffer: *mut ::std::os::raw::c_void,
size: usize,
count: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_WriteObjectData(
object: TEE_ObjectHandle,
buffer: *mut ::std::os::raw::c_void,
size: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_TruncateObjectData(object: TEE_ObjectHandle, size: usize) -> TEE_Result;
}
extern "C" {
pub fn TEE_SeekObjectData(
object: TEE_ObjectHandle,
offset: intmax_t,
whence: TEE_Whence,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AllocateOperation(
operation: *mut TEE_OperationHandle,
algorithm: u32,
mode: u32,
maxKeySize: u32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_FreeOperation(operation: TEE_OperationHandle);
}
extern "C" {
pub fn TEE_GetOperationInfo(
operation: TEE_OperationHandle,
operationInfo: *mut TEE_OperationInfo,
);
}
extern "C" {
pub fn TEE_GetOperationInfoMultiple(
operation: TEE_OperationHandle,
operationInfoMultiple: *mut TEE_OperationInfoMultiple,
operationSize: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_ResetOperation(operation: TEE_OperationHandle);
}
extern "C" {
pub fn TEE_SetOperationKey(operation: TEE_OperationHandle, key: TEE_ObjectHandle)
-> TEE_Result;
}
extern "C" {
pub fn TEE_SetOperationKey2(
operation: TEE_OperationHandle,
key1: TEE_ObjectHandle,
key2: TEE_ObjectHandle,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CopyOperation(dstOperation: TEE_OperationHandle, srcOperation: TEE_OperationHandle);
}
extern "C" {
pub fn TEE_IsAlgorithmSupported(algId: u32, element: u32) -> TEE_Result;
}
extern "C" {
pub fn TEE_DigestUpdate(
operation: TEE_OperationHandle,
chunk: *mut ::std::os::raw::c_void,
chunkSize: usize,
);
}
extern "C" {
pub fn TEE_DigestDoFinal(
operation: TEE_OperationHandle,
chunk: *mut ::std::os::raw::c_void,
chunkLen: usize,
hash: *mut ::std::os::raw::c_void,
hashLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_DigestExtract(
operation: TEE_OperationHandle,
hash: *mut ::std::os::raw::c_void,
hashLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CipherInit(
operation: TEE_OperationHandle,
IV: *mut ::std::os::raw::c_void,
IVLen: usize,
);
}
extern "C" {
pub fn TEE_CipherUpdate(
operation: TEE_OperationHandle,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_CipherDoFinal(
operation: TEE_OperationHandle,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_MACInit(
operation: TEE_OperationHandle,
IV: *mut ::std::os::raw::c_void,
IVLen: usize,
);
}
extern "C" {
pub fn TEE_MACUpdate(
operation: TEE_OperationHandle,
chunk: *mut ::std::os::raw::c_void,
chunkSize: usize,
);
}
extern "C" {
pub fn TEE_MACComputeFinal(
operation: TEE_OperationHandle,
message: *mut ::std::os::raw::c_void,
messageLen: usize,
mac: *mut ::std::os::raw::c_void,
macLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_MACCompareFinal(
operation: TEE_OperationHandle,
message: *mut ::std::os::raw::c_void,
messageLen: usize,
mac: *mut ::std::os::raw::c_void,
macLen: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AEInit(
operation: TEE_OperationHandle,
nonce: *mut ::std::os::raw::c_void,
nonceLen: usize,
tagLen: u32,
AADLen: usize,
payloadLen: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AEUpdateAAD(
operation: TEE_OperationHandle,
AADdata: *mut ::std::os::raw::c_void,
AADdataLen: usize,
);
}
extern "C" {
pub fn TEE_AEUpdate(
operation: TEE_OperationHandle,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AEEncryptFinal(
operation: TEE_OperationHandle,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
tag: *mut ::std::os::raw::c_void,
tagLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AEDecryptFinal(
operation: TEE_OperationHandle,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
tag: *mut ::std::os::raw::c_void,
tagLen: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AsymmetricEncrypt(
operation: TEE_OperationHandle,
params: *mut TEE_Attribute,
paramCount: u32,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AsymmetricDecrypt(
operation: TEE_OperationHandle,
params: *mut TEE_Attribute,
paramCount: u32,
srcData: *mut ::std::os::raw::c_void,
srcLen: usize,
destData: *mut ::std::os::raw::c_void,
destLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AsymmetricSignDigest(
operation: TEE_OperationHandle,
params: *mut TEE_Attribute,
paramCount: u32,
digest: *mut ::std::os::raw::c_void,
digestLen: usize,
signature: *mut ::std::os::raw::c_void,
signatureLen: *mut usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_AsymmetricVerifyDigest(
operation: TEE_OperationHandle,
params: *mut TEE_Attribute,
paramCount: u32,
digest: *mut ::std::os::raw::c_void,
digestLen: usize,
signature: *mut ::std::os::raw::c_void,
signatureLen: usize,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_DeriveKey(
operation: TEE_OperationHandle,
params: *mut TEE_Attribute,
paramCount: u32,
derivedKey: TEE_ObjectHandle,
);
}
extern "C" {
pub fn TEE_GenerateRandom(randomBuffer: *mut ::std::os::raw::c_void, randomBufferLen: usize);
}
extern "C" {
pub fn TEE_GetSystemTime(time: *mut TEE_Time);
}
extern "C" {
pub fn TEE_Wait(timeout: u32) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetTAPersistentTime(time: *mut TEE_Time) -> TEE_Result;
}
extern "C" {
pub fn TEE_SetTAPersistentTime(time: *const TEE_Time) -> TEE_Result;
}
extern "C" {
pub fn TEE_GetREETime(time: *mut TEE_Time);
}
extern "C" {
pub fn TEE_BigIntFMMContextSizeInU32(modulusSizeInBits: usize) -> usize;
}
extern "C" {
pub fn TEE_BigIntFMMSizeInU32(modulusSizeInBits: usize) -> usize;
}
extern "C" {
pub fn TEE_BigIntInit(bigInt: *mut TEE_BigInt, len: usize);
}
extern "C" {
pub fn TEE_BigIntInitFMMContext1(
context: *mut TEE_BigIntFMMContext,
len: usize,
modulus: *mut TEE_BigInt,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntInitFMM(bigIntFMM: *mut TEE_BigIntFMM, len: usize);
}
extern "C" {
pub fn TEE_BigIntConvertFromOctetString(
dest: *mut TEE_BigInt,
buffer: *mut u8,
bufferLen: usize,
sign: i32,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntConvertToOctetString(
buffer: *mut ::std::os::raw::c_void,
bufferLen: *mut usize,
bigInt: *mut TEE_BigInt,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntConvertFromS32(dest: *mut TEE_BigInt, shortVal: i32);
}
extern "C" {
pub fn TEE_BigIntConvertToS32(dest: *mut i32, src: *mut TEE_BigInt) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntCmp(op1: *mut TEE_BigInt, op2: *mut TEE_BigInt) -> i32;
}
extern "C" {
pub fn TEE_BigIntCmpS32(op: *mut TEE_BigInt, shortVal: i32) -> i32;
}
extern "C" {
pub fn TEE_BigIntShiftRight(dest: *mut TEE_BigInt, op: *mut TEE_BigInt, bits: usize);
}
extern "C" {
pub fn TEE_BigIntGetBit(src: *mut TEE_BigInt, bitIndex: u32) -> bool;
}
extern "C" {
pub fn TEE_BigIntGetBitCount(src: *mut TEE_BigInt) -> u32;
}
extern "C" {
pub fn TEE_BigIntSetBit(op: *mut TEE_BigInt, bitIndex: u32, value: bool) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntAssign(dest: *mut TEE_BigInt, src: *const TEE_BigInt) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntAbs(dest: *mut TEE_BigInt, src: *const TEE_BigInt) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntAdd(dest: *mut TEE_BigInt, op1: *const TEE_BigInt, op2: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntSub(dest: *mut TEE_BigInt, op1: *const TEE_BigInt, op2: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntNeg(dest: *mut TEE_BigInt, op: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntMul(dest: *mut TEE_BigInt, op1: *const TEE_BigInt, op2: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntSquare(dest: *mut TEE_BigInt, op: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntDiv(
dest_q: *mut TEE_BigInt,
dest_r: *mut TEE_BigInt,
op1: *const TEE_BigInt,
op2: *const TEE_BigInt,
);
}
extern "C" {
pub fn TEE_BigIntMod(dest: *mut TEE_BigInt, op: *const TEE_BigInt, n: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntAddMod(
dest: *mut TEE_BigInt,
op1: *const TEE_BigInt,
op2: *const TEE_BigInt,
n: *const TEE_BigInt,
);
}
extern "C" {
pub fn TEE_BigIntSubMod(
dest: *mut TEE_BigInt,
op1: *const TEE_BigInt,
op2: *const TEE_BigInt,
n: *const TEE_BigInt,
);
}
extern "C" {
pub fn TEE_BigIntMulMod(
dest: *mut TEE_BigInt,
op1: *const TEE_BigInt,
op2: *const TEE_BigInt,
n: *const TEE_BigInt,
);
}
extern "C" {
pub fn TEE_BigIntSquareMod(dest: *mut TEE_BigInt, op: *const TEE_BigInt, n: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntInvMod(dest: *mut TEE_BigInt, op: *const TEE_BigInt, n: *const TEE_BigInt);
}
extern "C" {
pub fn TEE_BigIntExpMod(
dest: *mut TEE_BigInt,
op1: *mut TEE_BigInt,
op2: *mut TEE_BigInt,
n: *mut TEE_BigInt,
context: *mut TEE_BigIntFMMContext,
) -> TEE_Result;
}
extern "C" {
pub fn TEE_BigIntRelativePrime(op1: *mut TEE_BigInt, op2: *mut TEE_BigInt) -> bool;
}
extern "C" {
pub fn TEE_BigIntComputeExtendedGcd(
gcd: *mut TEE_BigInt,
u: *mut TEE_BigInt,
v: *mut TEE_BigInt,
op1: *mut TEE_BigInt,
op2: *mut TEE_BigInt,
);
}
extern "C" {
pub fn TEE_BigIntIsProbablePrime(op: *mut TEE_BigInt, confidenceLevel: u32) -> i32;
}
extern "C" {
pub fn TEE_BigIntConvertToFMM(
dest: *mut TEE_BigIntFMM,
src: *mut TEE_BigInt,
n: *mut TEE_BigInt,
context: *mut TEE_BigIntFMMContext,
);
}
extern "C" {
pub fn TEE_BigIntConvertFromFMM(
dest: *mut TEE_BigInt,
src: *mut TEE_BigIntFMM,
n: *mut TEE_BigInt,
context: *mut TEE_BigIntFMMContext,
);
}
extern "C" {
pub fn TEE_BigIntComputeFMM(
dest: *mut TEE_BigIntFMM,
op1: *mut TEE_BigIntFMM,
op2: *mut TEE_BigIntFMM,
n: *mut TEE_BigInt,
context: *mut TEE_BigIntFMMContext,
);
}
extern "C" {
pub fn TEE_GetObjectInfo(object: TEE_ObjectHandle, objectInfo: *mut TEE_ObjectInfo);
}
extern "C" {
pub fn TEE_RestrictObjectUsage(object: TEE_ObjectHandle, objectUsage: u32);
}
extern "C" {
pub fn TEE_CopyObjectAttributes(destObject: TEE_ObjectHandle, srcObject: TEE_ObjectHandle);
}
extern "C" {
pub fn TEE_CloseAndDeletePersistentObject(object: TEE_ObjectHandle);
}
extern "C" {
pub fn TEE_BigIntInitFMMContext(
context: *mut TEE_BigIntFMMContext,
len: usize,
modulus: *const TEE_BigInt,
);
}