From 1f5e50aecdbd987ea88327f442a8893998a9ae2b Mon Sep 17 00:00:00 2001 From: Joe Rozner Date: Tue, 28 Jan 2025 09:56:03 -0800 Subject: [PATCH 1/3] Add pack pragma for struct padding back Signed-off-by: Joe Rozner --- .../src/bindings/aarch64-apple-darwin.rs | 215 --- .../src/bindings/aarch64-unknown-linux-gnu.rs | 215 --- .../src/bindings/arm-unknown-linux-gnueabi.rs | 215 --- cryptoki-sys/src/bindings/generic.rs | 301 +--- .../src/bindings/i686-unknown-linux-gnu.rs | 215 --- .../bindings/loongarch64-unknown-linux-gnu.rs | 215 --- .../bindings/powerpc64-unknown-linux-gnu.rs | 215 --- .../src/bindings/x86_64-apple-darwin.rs | 215 --- .../src/bindings/x86_64-pc-windows-msvc.rs | 1403 +++++++---------- .../src/bindings/x86_64-unknown-freebsd.rs | 215 --- .../src/bindings/x86_64-unknown-linux-gnu.rs | 215 --- cryptoki-sys/vendor/pkcs11.h | 8 + 12 files changed, 688 insertions(+), 2959 deletions(-) diff --git a/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs b/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs +++ b/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs b/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs index 4ebdf675..dafb9c05 100644 --- a/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs +++ b/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/generic.rs b/cryptoki-sys/src/bindings/generic.rs index cd35d46b..6b1868cf 100644 --- a/cryptoki-sys/src/bindings/generic.rs +++ b/cryptoki-sys/src/bindings/generic.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1036,6 +974,7 @@ pub type CK_LOCKMUTEX = pub type CK_UNLOCKMUTEX = ::std::option::Option CK_RV>; #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_ATTRIBUTE { pub type_: CK_ATTRIBUTE_TYPE, @@ -1052,6 +991,7 @@ impl Default for CK_ATTRIBUTE { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_C_INITIALIZE_ARGS { pub CreateMutex: CK_CREATEMUTEX, @@ -1078,6 +1018,7 @@ pub struct CK_DATE { pub day: [CK_CHAR; 2usize], } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { pub pTemplate: *mut CK_ATTRIBUTE, @@ -1100,6 +1041,7 @@ pub struct CK_VERSION { pub minor: CK_BYTE, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { pub cryptokiVersion: CK_VERSION, @@ -1109,6 +1051,7 @@ pub struct CK_INFO { pub libraryVersion: CK_VERSION, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { pub pInterfaceName: *mut CK_CHAR, @@ -1125,6 +1068,7 @@ impl Default for CK_INTERFACE { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_MECHANISM { pub mechanism: CK_MECHANISM_TYPE, @@ -1141,6 +1085,7 @@ impl Default for CK_MECHANISM { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_MECHANISM_INFO { pub ulMinKeySize: CK_ULONG, @@ -1148,6 +1093,7 @@ pub struct CK_MECHANISM_INFO { pub flags: CK_FLAGS, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { pub slotID: CK_SLOT_ID, @@ -1156,6 +1102,7 @@ pub struct CK_SESSION_INFO { pub ulDeviceError: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { pub slotDescription: [CK_UTF8CHAR; 64usize], @@ -1174,6 +1121,7 @@ impl Default for CK_SLOT_INFO { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_TOKEN_INFO { pub label: [CK_UTF8CHAR; 32usize], @@ -1195,137 +1143,13 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -1342,6 +1166,7 @@ impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CCM_PARAMS { pub ulDataLen: CK_ULONG, @@ -1361,12 +1186,14 @@ impl Default for CK_AES_CCM_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { pub pIv: *mut CK_BYTE, @@ -1386,6 +1213,7 @@ impl Default for CK_AES_GCM_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -1402,6 +1230,7 @@ impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -1418,12 +1247,14 @@ impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { pub ulDataLen: CK_ULONG, @@ -1444,6 +1275,7 @@ impl Default for CK_CCM_MESSAGE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_PARAMS { pub ulDataLen: CK_ULONG, @@ -1463,6 +1295,7 @@ impl Default for CK_CCM_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_CHACHA20_PARAMS { pub pBlockCounter: *mut CK_BYTE, @@ -1480,6 +1313,7 @@ impl Default for CK_CHACHA20_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_CMS_SIG_PARAMS { pub certificateHandle: CK_OBJECT_HANDLE, @@ -1501,6 +1335,7 @@ impl Default for CK_CMS_SIG_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 8usize], @@ -1517,6 +1352,7 @@ impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_DSA_PARAMETER_GEN_PARAM { pub hash: CK_MECHANISM_TYPE, @@ -1534,6 +1370,7 @@ impl Default for CK_DSA_PARAMETER_GEN_PARAM { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, @@ -1551,6 +1388,7 @@ impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_ECDH1_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -1569,6 +1407,7 @@ impl Default for CK_ECDH1_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_ECDH2_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -1591,6 +1430,7 @@ impl Default for CK_ECDH2_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_ECMQV_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -1614,6 +1454,7 @@ impl Default for CK_ECMQV_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_EDDSA_PARAMS { pub phFlag: CK_BBOOL, @@ -1630,6 +1471,7 @@ impl Default for CK_EDDSA_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_GCM_MESSAGE_PARAMS { pub pIv: *mut CK_BYTE, @@ -1649,6 +1491,7 @@ impl Default for CK_GCM_MESSAGE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_GCM_PARAMS { pub pIv: *mut CK_BYTE, @@ -1668,6 +1511,7 @@ impl Default for CK_GCM_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_GOSTR3410_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -1686,6 +1530,7 @@ impl Default for CK_GOSTR3410_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub pWrapOID: *mut CK_BYTE, @@ -1704,6 +1549,7 @@ impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_HKDF_PARAMS { pub bExtract: CK_BBOOL, @@ -1726,6 +1572,7 @@ impl Default for CK_HKDF_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_KEA_DERIVE_PARAMS { pub isSender: CK_BBOOL, @@ -1745,6 +1592,7 @@ impl Default for CK_KEA_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, @@ -1760,6 +1608,7 @@ impl Default for CK_KEY_DERIVATION_STRING_DATA { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub bBC: CK_BYTE, @@ -1776,6 +1625,7 @@ impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_KIP_PARAMS { pub pMechanism: *mut CK_MECHANISM, @@ -1793,6 +1643,7 @@ impl Default for CK_KIP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_OTP_PARAM { pub type_: CK_OTP_PARAM_TYPE, @@ -1809,6 +1660,7 @@ impl Default for CK_OTP_PARAM { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, @@ -1824,6 +1676,7 @@ impl Default for CK_OTP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, @@ -1839,6 +1692,7 @@ impl Default for CK_OTP_SIGNATURE_INFO { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_PBE_PARAMS { pub pInitVector: *mut CK_BYTE, @@ -1858,6 +1712,7 @@ impl Default for CK_PBE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_PKCS5_PBKD2_PARAMS { pub saltSource: CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE, @@ -1880,6 +1735,7 @@ impl Default for CK_PKCS5_PBKD2_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_PKCS5_PBKD2_PARAMS2 { pub saltSource: CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE, @@ -1902,6 +1758,7 @@ impl Default for CK_PKCS5_PBKD2_PARAMS2 { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_PRF_DATA_PARAM { pub type_: CK_PRF_DATA_TYPE, @@ -1918,18 +1775,21 @@ impl Default for CK_PRF_DATA_PARAM { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { pub ulWordsize: CK_ULONG, @@ -1947,6 +1807,7 @@ impl Default for CK_RC5_CBC_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulWordsize: CK_ULONG, @@ -1954,12 +1815,14 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulMacLength: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, @@ -1975,6 +1838,7 @@ impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_PKCS_OAEP_PARAMS { pub hashAlg: CK_MECHANISM_TYPE, @@ -1993,6 +1857,7 @@ impl Default for CK_RSA_PKCS_OAEP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RSA_PKCS_PSS_PARAMS { pub hashAlg: CK_MECHANISM_TYPE, @@ -2000,6 +1865,7 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub sLen: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub pNonce: *mut CK_BYTE, @@ -2016,6 +1882,7 @@ impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pNonce: *mut CK_BYTE, @@ -2033,6 +1900,7 @@ impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_PARAMS { pub pBlockCounter: *mut CK_BYTE, @@ -2049,6 +1917,7 @@ impl Default for CK_SALSA20_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -2065,6 +1934,7 @@ impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub ulPasswordLen: CK_ULONG, @@ -2089,6 +1959,7 @@ impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulOldWrappedXLen: CK_ULONG, @@ -2116,12 +1987,14 @@ impl Default for CK_SKIPJACK_RELAYX_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub dkmLengthMethod: CK_SP800_108_DKM_LENGTH_METHOD, @@ -2130,6 +2003,7 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { } pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub prfType: CK_SP800_108_PRF_TYPE, @@ -2150,6 +2024,7 @@ impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SP800_108_KDF_PARAMS { pub prfType: CK_SP800_108_PRF_TYPE, @@ -2168,6 +2043,7 @@ impl Default for CK_SP800_108_KDF_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub sk: *mut CK_BYTE, @@ -2189,6 +2065,7 @@ impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X2RATCHET_RESPOND_PARAMS { pub sk: *mut CK_BYTE, @@ -2210,6 +2087,7 @@ impl Default for CK_X2RATCHET_RESPOND_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X3DH_INITIATE_PARAMS { pub kdf: CK_X3DH_KDF_TYPE, @@ -2230,6 +2108,7 @@ impl Default for CK_X3DH_INITIATE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X3DH_RESPOND_PARAMS { pub kdf: CK_X3DH_KDF_TYPE, @@ -2249,6 +2128,7 @@ impl Default for CK_X3DH_RESPOND_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub kdf: CK_X9_42_DH_KDF_TYPE, @@ -2267,6 +2147,7 @@ impl Default for CK_X9_42_DH1_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub kdf: CK_X9_42_DH_KDF_TYPE, @@ -2289,6 +2170,7 @@ impl Default for CK_X9_42_DH2_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub kdf: CK_X9_42_DH_KDF_TYPE, @@ -2312,39 +2194,13 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { pub hClientMacSecret: CK_OBJECT_HANDLE, @@ -2364,6 +2220,7 @@ impl Default for CK_SSL3_KEY_MAT_OUT { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_RANDOM_DATA { pub pClientRandom: *mut CK_BYTE, @@ -2381,6 +2238,7 @@ impl Default for CK_SSL3_RANDOM_DATA { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_PARAMS { pub ulMacSizeInBits: CK_ULONG, @@ -2400,6 +2258,7 @@ impl Default for CK_SSL3_KEY_MAT_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, @@ -2415,6 +2274,7 @@ impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_KDF_PARAMS { pub prfMechanism: CK_MECHANISM_TYPE, @@ -2434,6 +2294,7 @@ impl Default for CK_TLS_KDF_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_TLS_MAC_PARAMS { pub prfHashMechanism: CK_MECHANISM_TYPE, @@ -2441,6 +2302,7 @@ pub struct CK_TLS_MAC_PARAMS { pub ulServerOrClient: CK_ULONG, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { pub pSeed: *mut CK_BYTE, @@ -2460,6 +2322,7 @@ impl Default for CK_TLS_PRF_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_TLS12_KEY_MAT_PARAMS { pub ulMacSizeInBits: CK_ULONG, @@ -2480,6 +2343,7 @@ impl Default for CK_TLS12_KEY_MAT_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, @@ -2496,6 +2360,7 @@ impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_KEY_MAT_OUT { pub hMacSecret: CK_OBJECT_HANDLE, @@ -2512,6 +2377,7 @@ impl Default for CK_WTLS_KEY_MAT_OUT { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_RANDOM_DATA { pub pClientRandom: *mut CK_BYTE, @@ -2529,6 +2395,7 @@ impl Default for CK_WTLS_RANDOM_DATA { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_KEY_MAT_PARAMS { pub DigestMechanism: CK_MECHANISM_TYPE, @@ -2550,6 +2417,7 @@ impl Default for CK_WTLS_KEY_MAT_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub DigestMechanism: CK_MECHANISM_TYPE, @@ -2566,6 +2434,7 @@ impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { } } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_PRF_PARAMS { pub DigestMechanism: CK_MECHANISM_TYPE, @@ -3173,6 +3042,7 @@ pub type CK_C_VerifyMessageNext = ::std::option::Option< pub type CK_C_MessageVerifyFinal = ::std::option::Option CK_RV>; #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST_3_0 { pub version: CK_VERSION, @@ -3270,6 +3140,7 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } #[repr(C)] +#[cfg_attr(windows, repr(packed))] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { pub version: CK_VERSION, diff --git a/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs index 4ebdf675..dafb9c05 100644 --- a/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs b/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs +++ b/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs b/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs index f5b0cedc..45fddd56 100644 --- a/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs +++ b/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1035,7 +973,7 @@ pub type CK_LOCKMUTEX = ::std::option::Option CK_RV>; pub type CK_UNLOCKMUTEX = ::std::option::Option CK_RV>; -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_ATTRIBUTE { pub type_: CK_ATTRIBUTE_TYPE, @@ -1048,12 +986,12 @@ fn bindgen_test_layout_CK_ATTRIBUTE() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 16usize, concat!("Size of: ", stringify!(CK_ATTRIBUTE)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) ); assert_eq!( @@ -1068,7 +1006,7 @@ fn bindgen_test_layout_CK_ATTRIBUTE() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_ATTRIBUTE), @@ -1078,7 +1016,7 @@ fn bindgen_test_layout_CK_ATTRIBUTE() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_ATTRIBUTE), @@ -1096,7 +1034,7 @@ impl Default for CK_ATTRIBUTE { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_C_INITIALIZE_ARGS { pub CreateMutex: CK_CREATEMUTEX, @@ -1112,12 +1050,12 @@ fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 44usize, concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) ); assert_eq!( @@ -1172,7 +1110,7 @@ fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_C_INITIALIZE_ARGS), @@ -1242,7 +1180,7 @@ fn bindgen_test_layout_CK_DATE() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { pub pTemplate: *mut CK_ATTRIBUTE, @@ -1255,12 +1193,12 @@ fn bindgen_test_layout_CK_DERIVED_KEY() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_DERIVED_KEY)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) ); assert_eq!( @@ -1285,7 +1223,7 @@ fn bindgen_test_layout_CK_DERIVED_KEY() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_DERIVED_KEY), @@ -1344,7 +1282,7 @@ fn bindgen_test_layout_CK_VERSION() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { pub cryptokiVersion: CK_VERSION, @@ -1359,12 +1297,12 @@ fn bindgen_test_layout_CK_INFO() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 76usize, + 72usize, concat!("Size of: ", stringify!(CK_INFO)) ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_INFO)) ); assert_eq!( @@ -1389,7 +1327,7 @@ fn bindgen_test_layout_CK_INFO() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, + 34usize, concat!( "Offset of field: ", stringify!(CK_INFO), @@ -1399,7 +1337,7 @@ fn bindgen_test_layout_CK_INFO() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 40usize, + 38usize, concat!( "Offset of field: ", stringify!(CK_INFO), @@ -1409,7 +1347,7 @@ fn bindgen_test_layout_CK_INFO() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 72usize, + 70usize, concat!( "Offset of field: ", stringify!(CK_INFO), @@ -1418,7 +1356,7 @@ fn bindgen_test_layout_CK_INFO() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { pub pInterfaceName: *mut CK_CHAR, @@ -1431,12 +1369,12 @@ fn bindgen_test_layout_CK_INTERFACE() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_INTERFACE)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_INTERFACE)) ); assert_eq!( @@ -1479,7 +1417,7 @@ impl Default for CK_INTERFACE { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_MECHANISM { pub mechanism: CK_MECHANISM_TYPE, @@ -1492,12 +1430,12 @@ fn bindgen_test_layout_CK_MECHANISM() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 16usize, concat!("Size of: ", stringify!(CK_MECHANISM)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_MECHANISM)) ); assert_eq!( @@ -1512,7 +1450,7 @@ fn bindgen_test_layout_CK_MECHANISM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_MECHANISM), @@ -1522,7 +1460,7 @@ fn bindgen_test_layout_CK_MECHANISM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_MECHANISM), @@ -1540,7 +1478,7 @@ impl Default for CK_MECHANISM { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_MECHANISM_INFO { pub ulMinKeySize: CK_ULONG, @@ -1558,7 +1496,7 @@ fn bindgen_test_layout_CK_MECHANISM_INFO() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) ); assert_eq!( @@ -1592,7 +1530,7 @@ fn bindgen_test_layout_CK_MECHANISM_INFO() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { pub slotID: CK_SLOT_ID, @@ -1611,7 +1549,7 @@ fn bindgen_test_layout_CK_SESSION_INFO() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_SESSION_INFO)) ); assert_eq!( @@ -1655,7 +1593,7 @@ fn bindgen_test_layout_CK_SESSION_INFO() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { pub slotDescription: [CK_UTF8CHAR; 64usize], @@ -1675,7 +1613,7 @@ fn bindgen_test_layout_CK_SLOT_INFO() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_SLOT_INFO)) ); assert_eq!( @@ -1738,7 +1676,7 @@ impl Default for CK_SLOT_INFO { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_TOKEN_INFO { pub label: [CK_UTF8CHAR; 32usize], @@ -1771,7 +1709,7 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) ); assert_eq!( @@ -1955,137 +1893,12 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -2099,12 +1912,12 @@ fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( @@ -2147,7 +1960,7 @@ impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CCM_PARAMS { pub ulDataLen: CK_ULONG, @@ -2163,12 +1976,12 @@ fn bindgen_test_layout_CK_AES_CCM_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 32usize, concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) ); assert_eq!( @@ -2183,7 +1996,7 @@ fn bindgen_test_layout_CK_AES_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_AES_CCM_PARAMS), @@ -2193,7 +2006,7 @@ fn bindgen_test_layout_CK_AES_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_AES_CCM_PARAMS), @@ -2203,7 +2016,7 @@ fn bindgen_test_layout_CK_AES_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_AES_CCM_PARAMS), @@ -2213,7 +2026,7 @@ fn bindgen_test_layout_CK_AES_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_AES_CCM_PARAMS), @@ -2223,7 +2036,7 @@ fn bindgen_test_layout_CK_AES_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 36usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_AES_CCM_PARAMS), @@ -2241,7 +2054,7 @@ impl Default for CK_AES_CCM_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, @@ -2258,7 +2071,7 @@ fn bindgen_test_layout_CK_AES_CTR_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) ); assert_eq!( @@ -2282,7 +2095,7 @@ fn bindgen_test_layout_CK_AES_CTR_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { pub pIv: *mut CK_BYTE, @@ -2303,7 +2116,7 @@ fn bindgen_test_layout_CK_AES_GCM_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) ); assert_eq!( @@ -2376,7 +2189,7 @@ impl Default for CK_AES_GCM_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -2390,12 +2203,12 @@ fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( @@ -2438,7 +2251,7 @@ impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -2452,12 +2265,12 @@ fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) @@ -2503,7 +2316,7 @@ impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, @@ -2521,7 +2334,7 @@ fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) ); assert_eq!( @@ -2545,7 +2358,7 @@ fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { pub ulDataLen: CK_ULONG, @@ -2563,12 +2376,12 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 36usize, concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) ); assert_eq!( @@ -2583,7 +2396,7 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_CCM_MESSAGE_PARAMS), @@ -2593,7 +2406,7 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_CCM_MESSAGE_PARAMS), @@ -2603,7 +2416,7 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 20usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_CCM_MESSAGE_PARAMS), @@ -2613,7 +2426,7 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_CCM_MESSAGE_PARAMS), @@ -2623,7 +2436,7 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_CCM_MESSAGE_PARAMS), @@ -2633,7 +2446,7 @@ fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_CCM_MESSAGE_PARAMS), @@ -2651,7 +2464,7 @@ impl Default for CK_CCM_MESSAGE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_PARAMS { pub ulDataLen: CK_ULONG, @@ -2667,12 +2480,12 @@ fn bindgen_test_layout_CK_CCM_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 32usize, concat!("Size of: ", stringify!(CK_CCM_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) ); assert_eq!( @@ -2687,7 +2500,7 @@ fn bindgen_test_layout_CK_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_CCM_PARAMS), @@ -2697,7 +2510,7 @@ fn bindgen_test_layout_CK_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_CCM_PARAMS), @@ -2707,7 +2520,7 @@ fn bindgen_test_layout_CK_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_CCM_PARAMS), @@ -2717,7 +2530,7 @@ fn bindgen_test_layout_CK_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_CCM_PARAMS), @@ -2727,7 +2540,7 @@ fn bindgen_test_layout_CK_CCM_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 36usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_CCM_PARAMS), @@ -2745,7 +2558,7 @@ impl Default for CK_CCM_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_CHACHA20_PARAMS { pub pBlockCounter: *mut CK_BYTE, @@ -2759,12 +2572,12 @@ fn bindgen_test_layout_CK_CHACHA20_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 24usize, concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) ); assert_eq!( @@ -2789,7 +2602,7 @@ fn bindgen_test_layout_CK_CHACHA20_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_CHACHA20_PARAMS), @@ -2799,7 +2612,7 @@ fn bindgen_test_layout_CK_CHACHA20_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_CHACHA20_PARAMS), @@ -2817,7 +2630,7 @@ impl Default for CK_CHACHA20_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_CMS_SIG_PARAMS { pub certificateHandle: CK_OBJECT_HANDLE, @@ -2835,12 +2648,12 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 52usize, concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) ); assert_eq!( @@ -2855,7 +2668,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2865,7 +2678,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2875,7 +2688,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2885,7 +2698,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2895,7 +2708,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2905,7 +2718,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2915,7 +2728,7 @@ fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, + 48usize, concat!( "Offset of field: ", stringify!(CK_CMS_SIG_PARAMS), @@ -2933,7 +2746,7 @@ impl Default for CK_CMS_SIG_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 8usize], @@ -2947,12 +2760,12 @@ fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( @@ -2995,7 +2808,7 @@ impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_DSA_PARAMETER_GEN_PARAM { pub hash: CK_MECHANISM_TYPE, @@ -3010,12 +2823,12 @@ fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) ); assert_eq!( @@ -3030,7 +2843,7 @@ fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM), @@ -3040,7 +2853,7 @@ fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM), @@ -3050,7 +2863,7 @@ fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 20usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM), @@ -3068,7 +2881,7 @@ impl Default for CK_DSA_PARAMETER_GEN_PARAM { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, @@ -3083,12 +2896,12 @@ fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) ); assert_eq!( @@ -3123,7 +2936,7 @@ fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), @@ -3141,7 +2954,7 @@ impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_ECDH1_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -3157,12 +2970,12 @@ fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) ); assert_eq!( @@ -3207,7 +3020,7 @@ fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_ECDH1_DERIVE_PARAMS), @@ -3225,7 +3038,7 @@ impl Default for CK_ECDH1_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_ECDH2_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -3245,12 +3058,12 @@ fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, + 48usize, concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) ); assert_eq!( @@ -3295,7 +3108,7 @@ fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_ECDH2_DERIVE_PARAMS), @@ -3305,7 +3118,7 @@ fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_ECDH2_DERIVE_PARAMS), @@ -3315,7 +3128,7 @@ fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 36usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_ECDH2_DERIVE_PARAMS), @@ -3325,7 +3138,7 @@ fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 40usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_ECDH2_DERIVE_PARAMS), @@ -3335,7 +3148,7 @@ fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 48usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_ECDH2_DERIVE_PARAMS), @@ -3353,7 +3166,7 @@ impl Default for CK_ECDH2_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_ECMQV_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -3374,12 +3187,12 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 52usize, concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) ); assert_eq!( @@ -3424,7 +3237,7 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_ECMQV_DERIVE_PARAMS), @@ -3434,7 +3247,7 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_ECMQV_DERIVE_PARAMS), @@ -3444,7 +3257,7 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 36usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_ECMQV_DERIVE_PARAMS), @@ -3454,7 +3267,7 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 40usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_ECMQV_DERIVE_PARAMS), @@ -3464,7 +3277,7 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 48usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_ECMQV_DERIVE_PARAMS), @@ -3474,7 +3287,7 @@ fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 56usize, + 48usize, concat!( "Offset of field: ", stringify!(CK_ECMQV_DERIVE_PARAMS), @@ -3492,7 +3305,7 @@ impl Default for CK_ECMQV_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_EDDSA_PARAMS { pub phFlag: CK_BBOOL, @@ -3505,12 +3318,12 @@ fn bindgen_test_layout_CK_EDDSA_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 16usize, + 13usize, concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) ); assert_eq!( @@ -3525,7 +3338,7 @@ fn bindgen_test_layout_CK_EDDSA_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 4usize, + 1usize, concat!( "Offset of field: ", stringify!(CK_EDDSA_PARAMS), @@ -3535,7 +3348,7 @@ fn bindgen_test_layout_CK_EDDSA_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 8usize, + 5usize, concat!( "Offset of field: ", stringify!(CK_EDDSA_PARAMS), @@ -3553,7 +3366,7 @@ impl Default for CK_EDDSA_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_GCM_MESSAGE_PARAMS { pub pIv: *mut CK_BYTE, @@ -3570,12 +3383,12 @@ fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 32usize, concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) ); assert_eq!( @@ -3620,7 +3433,7 @@ fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_GCM_MESSAGE_PARAMS), @@ -3630,7 +3443,7 @@ fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_GCM_MESSAGE_PARAMS), @@ -3648,7 +3461,7 @@ impl Default for CK_GCM_MESSAGE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_GCM_PARAMS { pub pIv: *mut CK_BYTE, @@ -3669,7 +3482,7 @@ fn bindgen_test_layout_CK_GCM_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) ); assert_eq!( @@ -3742,7 +3555,7 @@ impl Default for CK_GCM_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_GOSTR3410_DERIVE_PARAMS { pub kdf: CK_EC_KDF_TYPE, @@ -3758,12 +3571,12 @@ fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 28usize, concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) ); assert_eq!( @@ -3778,7 +3591,7 @@ fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS), @@ -3788,7 +3601,7 @@ fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS), @@ -3798,7 +3611,7 @@ fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS), @@ -3808,7 +3621,7 @@ fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS), @@ -3826,7 +3639,7 @@ impl Default for CK_GOSTR3410_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub pWrapOID: *mut CK_BYTE, @@ -3842,12 +3655,12 @@ fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) ); assert_eq!( @@ -3872,7 +3685,7 @@ fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), @@ -3882,7 +3695,7 @@ fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), @@ -3892,7 +3705,7 @@ fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 28usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), @@ -3910,7 +3723,7 @@ impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_HKDF_PARAMS { pub bExtract: CK_BBOOL, @@ -3929,12 +3742,12 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 38usize, concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) ); assert_eq!( @@ -3959,7 +3772,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 4usize, + 2usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -3969,7 +3782,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 8usize, + 6usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -3979,7 +3792,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 16usize, + 10usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -3989,7 +3802,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 24usize, + 18usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -3999,7 +3812,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 28usize, + 22usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -4009,7 +3822,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 32usize, + 26usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -4019,7 +3832,7 @@ fn bindgen_test_layout_CK_HKDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 40usize, + 34usize, concat!( "Offset of field: ", stringify!(CK_HKDF_PARAMS), @@ -4037,7 +3850,7 @@ impl Default for CK_HKDF_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_KEA_DERIVE_PARAMS { pub isSender: CK_BBOOL, @@ -4053,12 +3866,12 @@ fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 33usize, concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) ); assert_eq!( @@ -4073,7 +3886,7 @@ fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 4usize, + 1usize, concat!( "Offset of field: ", stringify!(CK_KEA_DERIVE_PARAMS), @@ -4083,7 +3896,7 @@ fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 8usize, + 5usize, concat!( "Offset of field: ", stringify!(CK_KEA_DERIVE_PARAMS), @@ -4093,7 +3906,7 @@ fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 16usize, + 13usize, concat!( "Offset of field: ", stringify!(CK_KEA_DERIVE_PARAMS), @@ -4103,7 +3916,7 @@ fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, + 21usize, concat!( "Offset of field: ", stringify!(CK_KEA_DERIVE_PARAMS), @@ -4113,7 +3926,7 @@ fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, + 25usize, concat!( "Offset of field: ", stringify!(CK_KEA_DERIVE_PARAMS), @@ -4131,7 +3944,7 @@ impl Default for CK_KEA_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, @@ -4144,12 +3957,12 @@ fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 16usize, + 12usize, concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) ); assert_eq!( @@ -4182,7 +3995,7 @@ impl Default for CK_KEY_DERIVATION_STRING_DATA { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub bBC: CK_BYTE, @@ -4196,12 +4009,12 @@ fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 13usize, concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) ); assert_eq!( @@ -4216,7 +4029,7 @@ fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, + 1usize, concat!( "Offset of field: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), @@ -4226,7 +4039,7 @@ fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, + 9usize, concat!( "Offset of field: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), @@ -4244,7 +4057,7 @@ impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_KIP_PARAMS { pub pMechanism: *mut CK_MECHANISM, @@ -4258,12 +4071,12 @@ fn bindgen_test_layout_CK_KIP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 24usize, concat!("Size of: ", stringify!(CK_KIP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) ); assert_eq!( @@ -4288,7 +4101,7 @@ fn bindgen_test_layout_CK_KIP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_KIP_PARAMS), @@ -4298,7 +4111,7 @@ fn bindgen_test_layout_CK_KIP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_KIP_PARAMS), @@ -4316,7 +4129,7 @@ impl Default for CK_KIP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_OTP_PARAM { pub type_: CK_OTP_PARAM_TYPE, @@ -4329,12 +4142,12 @@ fn bindgen_test_layout_CK_OTP_PARAM() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 16usize, concat!("Size of: ", stringify!(CK_OTP_PARAM)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_OTP_PARAM)) ); assert_eq!( @@ -4349,7 +4162,7 @@ fn bindgen_test_layout_CK_OTP_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_OTP_PARAM), @@ -4359,7 +4172,7 @@ fn bindgen_test_layout_CK_OTP_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_OTP_PARAM), @@ -4377,7 +4190,7 @@ impl Default for CK_OTP_PARAM { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, @@ -4389,12 +4202,12 @@ fn bindgen_test_layout_CK_OTP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 16usize, + 12usize, concat!("Size of: ", stringify!(CK_OTP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) ); assert_eq!( @@ -4427,7 +4240,7 @@ impl Default for CK_OTP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, @@ -4440,12 +4253,12 @@ fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 16usize, + 12usize, concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) ); assert_eq!( @@ -4478,7 +4291,7 @@ impl Default for CK_OTP_SIGNATURE_INFO { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_PBE_PARAMS { pub pInitVector: *mut CK_BYTE, @@ -4494,12 +4307,12 @@ fn bindgen_test_layout_CK_PBE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 36usize, concat!("Size of: ", stringify!(CK_PBE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) ); assert_eq!( @@ -4534,7 +4347,7 @@ fn bindgen_test_layout_CK_PBE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_PBE_PARAMS), @@ -4544,7 +4357,7 @@ fn bindgen_test_layout_CK_PBE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_PBE_PARAMS), @@ -4554,7 +4367,7 @@ fn bindgen_test_layout_CK_PBE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 36usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_PBE_PARAMS), @@ -4572,7 +4385,7 @@ impl Default for CK_PBE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_PKCS5_PBKD2_PARAMS { pub saltSource: CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE, @@ -4592,12 +4405,12 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 52usize, concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) ); assert_eq!( @@ -4612,7 +4425,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4622,7 +4435,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4632,7 +4445,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 20usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4642,7 +4455,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4652,7 +4465,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4662,7 +4475,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4672,7 +4485,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 48usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4682,7 +4495,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 56usize, + 44usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS), @@ -4700,7 +4513,7 @@ impl Default for CK_PKCS5_PBKD2_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_PKCS5_PBKD2_PARAMS2 { pub saltSource: CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE, @@ -4720,12 +4533,12 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 48usize, concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) ); assert_eq!( @@ -4740,7 +4553,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4750,7 +4563,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4760,7 +4573,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 20usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4770,7 +4583,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4780,7 +4593,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4790,7 +4603,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4800,7 +4613,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 48usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4810,7 +4623,7 @@ fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 56usize, + 44usize, concat!( "Offset of field: ", stringify!(CK_PKCS5_PBKD2_PARAMS2), @@ -4828,7 +4641,7 @@ impl Default for CK_PKCS5_PBKD2_PARAMS2 { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_PRF_DATA_PARAM { pub type_: CK_PRF_DATA_TYPE, @@ -4841,12 +4654,12 @@ fn bindgen_test_layout_CK_PRF_DATA_PARAM() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 16usize, concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) ); assert_eq!( @@ -4861,7 +4674,7 @@ fn bindgen_test_layout_CK_PRF_DATA_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_PRF_DATA_PARAM), @@ -4871,7 +4684,7 @@ fn bindgen_test_layout_CK_PRF_DATA_PARAM() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_PRF_DATA_PARAM), @@ -4889,7 +4702,7 @@ impl Default for CK_PRF_DATA_PARAM { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, @@ -4906,7 +4719,7 @@ fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) ); assert_eq!( @@ -4930,7 +4743,7 @@ fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, @@ -4948,7 +4761,7 @@ fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) ); assert_eq!( @@ -4972,7 +4785,7 @@ fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { pub ulWordsize: CK_ULONG, @@ -4986,12 +4799,12 @@ fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) ); assert_eq!( @@ -5044,7 +4857,7 @@ impl Default for CK_RC5_CBC_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulWordsize: CK_ULONG, @@ -5063,7 +4876,7 @@ fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) ); assert_eq!( @@ -5097,7 +4910,7 @@ fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, @@ -5114,7 +4927,7 @@ fn bindgen_test_layout_CK_RC5_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) ); assert_eq!( @@ -5138,7 +4951,7 @@ fn bindgen_test_layout_CK_RC5_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, @@ -5151,12 +4964,12 @@ fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 16usize, + 12usize, concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) ); assert_eq!( @@ -5171,7 +4984,7 @@ fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), @@ -5189,7 +5002,7 @@ impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_PKCS_OAEP_PARAMS { pub hashAlg: CK_MECHANISM_TYPE, @@ -5205,12 +5018,12 @@ fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 24usize, concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) ); assert_eq!( @@ -5245,7 +5058,7 @@ fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS), @@ -5255,7 +5068,7 @@ fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS), @@ -5273,7 +5086,7 @@ impl Default for CK_RSA_PKCS_OAEP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RSA_PKCS_PSS_PARAMS { pub hashAlg: CK_MECHANISM_TYPE, @@ -5292,7 +5105,7 @@ fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) ); assert_eq!( @@ -5326,7 +5139,7 @@ fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub pNonce: *mut CK_BYTE, @@ -5340,7 +5153,7 @@ fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!( "Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) @@ -5348,7 +5161,7 @@ fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) @@ -5376,7 +5189,7 @@ fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), @@ -5394,7 +5207,7 @@ impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pNonce: *mut CK_BYTE, @@ -5409,12 +5222,12 @@ fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 24usize, concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) @@ -5442,7 +5255,7 @@ fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), @@ -5452,7 +5265,7 @@ fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), @@ -5470,7 +5283,7 @@ impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_PARAMS { pub pBlockCounter: *mut CK_BYTE, @@ -5483,12 +5296,12 @@ fn bindgen_test_layout_CK_SALSA20_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 24usize, + 20usize, concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) ); assert_eq!( @@ -5531,7 +5344,7 @@ impl Default for CK_SALSA20_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub iv: [CK_BYTE; 16usize], @@ -5545,12 +5358,12 @@ fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) ); assert_eq!( @@ -5593,7 +5406,7 @@ impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub ulPasswordLen: CK_ULONG, @@ -5615,12 +5428,12 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 80usize, + 68usize, concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) ); assert_eq!( @@ -5635,7 +5448,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5645,7 +5458,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5655,7 +5468,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5665,7 +5478,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5675,7 +5488,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 36usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5685,7 +5498,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5695,7 +5508,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 48usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5705,7 +5518,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 56usize, + 44usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5715,7 +5528,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 64usize, + 52usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5725,7 +5538,7 @@ fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 72usize, + 60usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), @@ -5743,7 +5556,7 @@ impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulOldWrappedXLen: CK_ULONG, @@ -5768,12 +5581,12 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 112usize, + 84usize, concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) ); assert_eq!( @@ -5788,7 +5601,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5798,7 +5611,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5808,7 +5621,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5818,7 +5631,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5828,7 +5641,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5838,7 +5651,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5848,7 +5661,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5858,7 +5671,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, + 48usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5868,7 +5681,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, + 52usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5878,7 +5691,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, + 60usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5888,7 +5701,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, + 64usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5898,7 +5711,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, + 72usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5908,7 +5721,7 @@ fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, + 76usize, concat!( "Offset of field: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS), @@ -5926,7 +5739,7 @@ impl Default for CK_SKIPJACK_RELAYX_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, @@ -5939,12 +5752,12 @@ fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 8usize, + 5usize, concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) ); assert_eq!( @@ -5959,7 +5772,7 @@ fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 4usize, + 1usize, concat!( "Offset of field: ", stringify!(CK_SP800_108_COUNTER_FORMAT), @@ -5968,7 +5781,7 @@ fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub dkmLengthMethod: CK_SP800_108_DKM_LENGTH_METHOD, @@ -5982,12 +5795,12 @@ fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 12usize, + 9usize, concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) ); assert_eq!( @@ -6012,7 +5825,7 @@ fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, + 5usize, concat!( "Offset of field: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), @@ -6022,7 +5835,7 @@ fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { ); } pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub prfType: CK_SP800_108_PRF_TYPE, @@ -6040,12 +5853,12 @@ fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 40usize, concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) @@ -6093,7 +5906,7 @@ fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), @@ -6103,7 +5916,7 @@ fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), @@ -6113,7 +5926,7 @@ fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), @@ -6131,7 +5944,7 @@ impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SP800_108_KDF_PARAMS { pub prfType: CK_SP800_108_PRF_TYPE, @@ -6147,12 +5960,12 @@ fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) ); assert_eq!( @@ -6197,7 +6010,7 @@ fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_SP800_108_KDF_PARAMS), @@ -6215,7 +6028,7 @@ impl Default for CK_SP800_108_KDF_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub sk: *mut CK_BYTE, @@ -6234,12 +6047,12 @@ fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 33usize, concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) ); assert_eq!( @@ -6294,7 +6107,7 @@ fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 24usize, + 21usize, concat!( "Offset of field: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), @@ -6304,7 +6117,7 @@ fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 28usize, + 25usize, concat!( "Offset of field: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), @@ -6314,7 +6127,7 @@ fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 32usize, + 29usize, concat!( "Offset of field: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), @@ -6332,7 +6145,7 @@ impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X2RATCHET_RESPOND_PARAMS { pub sk: *mut CK_BYTE, @@ -6351,12 +6164,12 @@ fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 33usize, concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) ); assert_eq!( @@ -6411,7 +6224,7 @@ fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 24usize, + 21usize, concat!( "Offset of field: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS), @@ -6421,7 +6234,7 @@ fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 28usize, + 25usize, concat!( "Offset of field: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS), @@ -6431,7 +6244,7 @@ fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 32usize, + 29usize, concat!( "Offset of field: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS), @@ -6449,7 +6262,7 @@ impl Default for CK_X2RATCHET_RESPOND_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X3DH_INITIATE_PARAMS { pub kdf: CK_X3DH_KDF_TYPE, @@ -6467,12 +6280,12 @@ fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 36usize, concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) ); assert_eq!( @@ -6507,7 +6320,7 @@ fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_X3DH_INITIATE_PARAMS), @@ -6517,7 +6330,7 @@ fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_X3DH_INITIATE_PARAMS), @@ -6527,7 +6340,7 @@ fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_X3DH_INITIATE_PARAMS), @@ -6537,7 +6350,7 @@ fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 36usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_X3DH_INITIATE_PARAMS), @@ -6555,7 +6368,7 @@ impl Default for CK_X3DH_INITIATE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X3DH_RESPOND_PARAMS { pub kdf: CK_X3DH_KDF_TYPE, @@ -6572,12 +6385,12 @@ fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 40usize, concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) ); assert_eq!( @@ -6592,7 +6405,7 @@ fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_X3DH_RESPOND_PARAMS), @@ -6602,7 +6415,7 @@ fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_X3DH_RESPOND_PARAMS), @@ -6612,7 +6425,7 @@ fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_X3DH_RESPOND_PARAMS), @@ -6622,7 +6435,7 @@ fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_X3DH_RESPOND_PARAMS), @@ -6632,7 +6445,7 @@ fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_X3DH_RESPOND_PARAMS), @@ -6650,7 +6463,7 @@ impl Default for CK_X3DH_RESPOND_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub kdf: CK_X9_42_DH_KDF_TYPE, @@ -6666,12 +6479,12 @@ fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 28usize, concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) ); assert_eq!( @@ -6716,7 +6529,7 @@ fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS), @@ -6734,7 +6547,7 @@ impl Default for CK_X9_42_DH1_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub kdf: CK_X9_42_DH_KDF_TYPE, @@ -6754,12 +6567,12 @@ fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, + 48usize, concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) ); assert_eq!( @@ -6804,7 +6617,7 @@ fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS), @@ -6814,7 +6627,7 @@ fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS), @@ -6824,7 +6637,7 @@ fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 36usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS), @@ -6834,7 +6647,7 @@ fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 40usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS), @@ -6844,7 +6657,7 @@ fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 48usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS), @@ -6862,7 +6675,7 @@ impl Default for CK_X9_42_DH2_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub kdf: CK_X9_42_DH_KDF_TYPE, @@ -6883,12 +6696,12 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 52usize, concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) ); assert_eq!( @@ -6933,7 +6746,7 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS), @@ -6943,7 +6756,7 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 32usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS), @@ -6953,7 +6766,7 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 36usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS), @@ -6963,7 +6776,7 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 40usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS), @@ -6973,7 +6786,7 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 48usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS), @@ -6983,7 +6796,7 @@ fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 56usize, + 48usize, concat!( "Offset of field: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS), @@ -7001,7 +6814,7 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, @@ -7017,7 +6830,7 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) ); assert_eq!( @@ -7031,35 +6844,7 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { pub hClientMacSecret: CK_OBJECT_HANDLE, @@ -7080,7 +6865,7 @@ fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) ); assert_eq!( @@ -7153,7 +6938,7 @@ impl Default for CK_SSL3_KEY_MAT_OUT { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_RANDOM_DATA { pub pClientRandom: *mut CK_BYTE, @@ -7167,12 +6952,12 @@ fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 24usize, concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) ); assert_eq!( @@ -7197,7 +6982,7 @@ fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_SSL3_RANDOM_DATA), @@ -7207,7 +6992,7 @@ fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_SSL3_RANDOM_DATA), @@ -7225,7 +7010,7 @@ impl Default for CK_SSL3_RANDOM_DATA { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_PARAMS { pub ulMacSizeInBits: CK_ULONG, @@ -7242,12 +7027,12 @@ fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, + 45usize, concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) ); assert_eq!( @@ -7292,7 +7077,7 @@ fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, + 13usize, concat!( "Offset of field: ", stringify!(CK_SSL3_KEY_MAT_PARAMS), @@ -7302,7 +7087,7 @@ fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 48usize, + 37usize, concat!( "Offset of field: ", stringify!(CK_SSL3_KEY_MAT_PARAMS), @@ -7320,7 +7105,7 @@ impl Default for CK_SSL3_KEY_MAT_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, @@ -7333,12 +7118,12 @@ fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 40usize, + 32usize, concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) @@ -7356,7 +7141,7 @@ fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), @@ -7374,7 +7159,7 @@ impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_KDF_PARAMS { pub prfMechanism: CK_MECHANISM_TYPE, @@ -7390,12 +7175,12 @@ fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 72usize, + 52usize, concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) ); assert_eq!( @@ -7410,7 +7195,7 @@ fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_TLS_KDF_PARAMS), @@ -7420,7 +7205,7 @@ fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_TLS_KDF_PARAMS), @@ -7430,7 +7215,7 @@ fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_TLS_KDF_PARAMS), @@ -7440,7 +7225,7 @@ fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, + 40usize, concat!( "Offset of field: ", stringify!(CK_TLS_KDF_PARAMS), @@ -7450,7 +7235,7 @@ fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, + 48usize, concat!( "Offset of field: ", stringify!(CK_TLS_KDF_PARAMS), @@ -7468,7 +7253,7 @@ impl Default for CK_TLS_KDF_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_TLS_MAC_PARAMS { pub prfHashMechanism: CK_MECHANISM_TYPE, @@ -7486,7 +7271,7 @@ fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { ); assert_eq!( ::std::mem::align_of::(), - 4usize, + 1usize, concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) ); assert_eq!( @@ -7520,7 +7305,7 @@ fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { pub pSeed: *mut CK_BYTE, @@ -7536,12 +7321,12 @@ fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 40usize, concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) ); assert_eq!( @@ -7566,7 +7351,7 @@ fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_TLS_PRF_PARAMS), @@ -7576,7 +7361,7 @@ fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_TLS_PRF_PARAMS), @@ -7586,7 +7371,7 @@ fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_TLS_PRF_PARAMS), @@ -7596,7 +7381,7 @@ fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_TLS_PRF_PARAMS), @@ -7614,7 +7399,7 @@ impl Default for CK_TLS_PRF_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS12_KEY_MAT_PARAMS { pub ulMacSizeInBits: CK_ULONG, @@ -7632,12 +7417,12 @@ fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 49usize, concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) ); assert_eq!( @@ -7682,7 +7467,7 @@ fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, + 13usize, concat!( "Offset of field: ", stringify!(CK_TLS12_KEY_MAT_PARAMS), @@ -7692,7 +7477,7 @@ fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 48usize, + 37usize, concat!( "Offset of field: ", stringify!(CK_TLS12_KEY_MAT_PARAMS), @@ -7702,7 +7487,7 @@ fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 56usize, + 45usize, concat!( "Offset of field: ", stringify!(CK_TLS12_KEY_MAT_PARAMS), @@ -7720,7 +7505,7 @@ impl Default for CK_TLS12_KEY_MAT_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, @@ -7734,12 +7519,12 @@ fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 36usize, concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) @@ -7757,7 +7542,7 @@ fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), @@ -7767,7 +7552,7 @@ fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, + 32usize, concat!( "Offset of field: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), @@ -7785,7 +7570,7 @@ impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_KEY_MAT_OUT { pub hMacSecret: CK_OBJECT_HANDLE, @@ -7803,7 +7588,7 @@ fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) ); assert_eq!( @@ -7846,7 +7631,7 @@ impl Default for CK_WTLS_KEY_MAT_OUT { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_RANDOM_DATA { pub pClientRandom: *mut CK_BYTE, @@ -7860,12 +7645,12 @@ fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 32usize, + 24usize, concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) ); assert_eq!( @@ -7890,7 +7675,7 @@ fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_WTLS_RANDOM_DATA), @@ -7900,7 +7685,7 @@ fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, + 20usize, concat!( "Offset of field: ", stringify!(CK_WTLS_RANDOM_DATA), @@ -7918,7 +7703,7 @@ impl Default for CK_WTLS_RANDOM_DATA { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_KEY_MAT_PARAMS { pub DigestMechanism: CK_MECHANISM_TYPE, @@ -7937,12 +7722,12 @@ fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 64usize, + 53usize, concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) ); assert_eq!( @@ -8007,7 +7792,7 @@ fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, + 21usize, concat!( "Offset of field: ", stringify!(CK_WTLS_KEY_MAT_PARAMS), @@ -8017,7 +7802,7 @@ fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 56usize, + 45usize, concat!( "Offset of field: ", stringify!(CK_WTLS_KEY_MAT_PARAMS), @@ -8035,7 +7820,7 @@ impl Default for CK_WTLS_KEY_MAT_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub DigestMechanism: CK_MECHANISM_TYPE, @@ -8049,12 +7834,12 @@ fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 48usize, + 36usize, concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!( "Alignment of ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) @@ -8072,7 +7857,7 @@ fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), @@ -8082,7 +7867,7 @@ fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), @@ -8100,7 +7885,7 @@ impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { } } } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_WTLS_PRF_PARAMS { pub DigestMechanism: CK_MECHANISM_TYPE, @@ -8117,12 +7902,12 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, + 44usize, concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) ); assert_eq!( @@ -8137,7 +7922,7 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, + 4usize, concat!( "Offset of field: ", stringify!(CK_WTLS_PRF_PARAMS), @@ -8147,7 +7932,7 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, + 12usize, concat!( "Offset of field: ", stringify!(CK_WTLS_PRF_PARAMS), @@ -8157,7 +7942,7 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, + 16usize, concat!( "Offset of field: ", stringify!(CK_WTLS_PRF_PARAMS), @@ -8167,7 +7952,7 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, + 24usize, concat!( "Offset of field: ", stringify!(CK_WTLS_PRF_PARAMS), @@ -8177,7 +7962,7 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, + 28usize, concat!( "Offset of field: ", stringify!(CK_WTLS_PRF_PARAMS), @@ -8187,7 +7972,7 @@ fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, + 36usize, concat!( "Offset of field: ", stringify!(CK_WTLS_PRF_PARAMS), @@ -8792,7 +8577,7 @@ pub type CK_C_VerifyMessageNext = ::std::option::Option< >; pub type CK_C_MessageVerifyFinal = ::std::option::Option CK_RV>; -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST_3_0 { pub version: CK_VERSION, @@ -8895,12 +8680,12 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 744usize, + 738usize, concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) ); assert_eq!( @@ -8915,7 +8700,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, + 2usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8925,7 +8710,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, + 10usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8935,7 +8720,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, + 18usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8945,7 +8730,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, + 26usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8955,7 +8740,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, + 34usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8965,7 +8750,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, + 42usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8975,7 +8760,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, + 50usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8985,7 +8770,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, + 58usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -8995,7 +8780,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, + 66usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9005,7 +8790,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, + 74usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9015,7 +8800,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, + 82usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9025,7 +8810,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, + 90usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9035,7 +8820,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, + 98usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9045,7 +8830,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, + 106usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9055,7 +8840,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, + 114usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9065,7 +8850,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, + 122usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9075,7 +8860,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, + 130usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9085,7 +8870,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, + 138usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9095,7 +8880,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, + 146usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9105,7 +8890,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, + 154usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9115,7 +8900,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, + 162usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9125,7 +8910,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, + 170usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9135,7 +8920,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, + 178usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9145,7 +8930,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, + 186usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9155,7 +8940,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, + 194usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9165,7 +8950,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, + 202usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9175,7 +8960,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, + 210usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9185,7 +8970,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, + 218usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9195,7 +8980,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, + 226usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9205,7 +8990,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, + 234usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9215,7 +9000,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, + 242usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9225,7 +9010,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, + 250usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9235,7 +9020,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, + 258usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9245,7 +9030,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, + 266usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9255,7 +9040,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, + 274usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9265,7 +9050,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, + 282usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9275,7 +9060,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, + 290usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9285,7 +9070,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, + 298usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9295,7 +9080,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, + 306usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9305,7 +9090,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, + 314usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9315,7 +9100,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, + 322usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9325,7 +9110,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, + 330usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9335,7 +9120,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, + 338usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9345,7 +9130,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, + 346usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9355,7 +9140,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, + 354usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9365,7 +9150,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, + 362usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9375,7 +9160,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, + 370usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9385,7 +9170,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, + 378usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9395,7 +9180,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, + 386usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9405,7 +9190,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, + 394usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9415,7 +9200,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, + 402usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9425,7 +9210,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, + 410usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9435,7 +9220,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, + 418usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9445,7 +9230,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, + 426usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9455,7 +9240,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, + 434usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9465,7 +9250,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, + 442usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9475,7 +9260,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, + 450usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9485,7 +9270,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, + 458usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9495,7 +9280,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, + 466usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9505,7 +9290,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, + 474usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9515,7 +9300,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, + 482usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9525,7 +9310,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, + 490usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9535,7 +9320,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, + 498usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9545,7 +9330,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, + 506usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9555,7 +9340,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, + 514usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9565,7 +9350,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, + 522usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9575,7 +9360,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, + 530usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9585,7 +9370,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, + 538usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9595,7 +9380,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, + 546usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9605,7 +9390,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, + 554usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9615,7 +9400,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, + 562usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9625,7 +9410,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, + 570usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9635,7 +9420,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, + 578usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9645,7 +9430,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, + 586usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9655,7 +9440,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, + 594usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9665,7 +9450,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, + 602usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9675,7 +9460,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, + 610usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9685,7 +9470,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, + 618usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9695,7 +9480,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, + 626usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9705,7 +9490,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, + 634usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9715,7 +9500,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, + 642usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9725,7 +9510,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, + 650usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9735,7 +9520,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, + 658usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9745,7 +9530,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, + 666usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9755,7 +9540,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, + 674usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9765,7 +9550,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, + 682usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9775,7 +9560,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, + 690usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9785,7 +9570,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, + 698usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9795,7 +9580,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, + 706usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9805,7 +9590,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, + 714usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9815,7 +9600,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, + 722usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9825,7 +9610,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, + 730usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST_3_0), @@ -9834,7 +9619,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { ) ); } -#[repr(C)] +#[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { pub version: CK_VERSION, @@ -9913,12 +9698,12 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 552usize, + 546usize, concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) ); assert_eq!( ::std::mem::align_of::(), - 8usize, + 1usize, concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) ); assert_eq!( @@ -9933,7 +9718,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, + 2usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -9943,7 +9728,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, + 10usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -9953,7 +9738,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, + 18usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -9963,7 +9748,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, + 26usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -9973,7 +9758,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, + 34usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -9983,7 +9768,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, + 42usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -9993,7 +9778,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, + 50usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10003,7 +9788,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, + 58usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10013,7 +9798,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, + 66usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10023,7 +9808,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, + 74usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10033,7 +9818,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, + 82usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10043,7 +9828,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, + 90usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10053,7 +9838,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, + 98usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10063,7 +9848,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, + 106usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10073,7 +9858,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, + 114usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10083,7 +9868,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, + 122usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10093,7 +9878,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, + 130usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10103,7 +9888,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, + 138usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10113,7 +9898,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, + 146usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10123,7 +9908,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, + 154usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10133,7 +9918,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, + 162usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10143,7 +9928,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, + 170usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10153,7 +9938,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, + 178usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10163,7 +9948,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, + 186usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10173,7 +9958,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, + 194usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10183,7 +9968,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, + 202usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10193,7 +9978,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, + 210usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10203,7 +9988,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, + 218usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10213,7 +9998,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, + 226usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10223,7 +10008,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, + 234usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10233,7 +10018,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, + 242usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10243,7 +10028,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, + 250usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10253,7 +10038,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, + 258usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10263,7 +10048,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, + 266usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10273,7 +10058,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, + 274usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10283,7 +10068,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, + 282usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10293,7 +10078,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, + 290usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10303,7 +10088,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, + 298usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10313,7 +10098,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, + 306usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10323,7 +10108,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, + 314usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10333,7 +10118,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, + 322usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10343,7 +10128,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, + 330usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10353,7 +10138,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, + 338usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10363,7 +10148,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, + 346usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10373,7 +10158,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, + 354usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10383,7 +10168,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, + 362usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10393,7 +10178,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, + 370usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10403,7 +10188,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, + 378usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10413,7 +10198,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, + 386usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10423,7 +10208,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, + 394usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10433,7 +10218,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, + 402usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10443,7 +10228,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, + 410usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10453,7 +10238,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, + 418usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10463,7 +10248,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, + 426usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10473,7 +10258,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, + 434usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10483,7 +10268,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, + 442usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10493,7 +10278,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, + 450usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10503,7 +10288,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, + 458usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10513,7 +10298,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, + 466usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10523,7 +10308,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, + 474usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10533,7 +10318,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, + 482usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10543,7 +10328,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, + 490usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10553,7 +10338,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, + 498usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10563,7 +10348,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, + 506usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10573,7 +10358,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, + 514usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10583,7 +10368,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, + 522usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10593,7 +10378,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, + 530usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), @@ -10603,7 +10388,7 @@ fn bindgen_test_layout_CK_FUNCTION_LIST() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, + 538usize, concat!( "Offset of field: ", stringify!(CK_FUNCTION_LIST), diff --git a/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs b/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs +++ b/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs index ecfed114..8de3c52d 100644 --- a/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs @@ -926,100 +926,38 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; -pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; -pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; -pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; -pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; -pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; -pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; -pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; -pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; -pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; -pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; -pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; -pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; -pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; -pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; -pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; -pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = - *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; -pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; -pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; -pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; -pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; -pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; -pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; -pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; -pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; -pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; -pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; -pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; -pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; -pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; -pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; -pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; -pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; -pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; -pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; -pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; -pub type CK_DATE_PTR = *mut CK_DATE; -pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; -pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; -pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; -pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; -pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; -pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; -pub type CK_INFO_PTR = *mut CK_INFO; -pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; -pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; -pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; -pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; -pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; -pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; -pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; -pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; -pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; -pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; -pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; -pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; -pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; -pub type CK_VERSION_PTR = *mut CK_VERSION; -pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1955,136 +1893,11 @@ fn bindgen_test_layout_CK_TOKEN_INFO() { ) ); } -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; -pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; -pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = - *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; -pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; -pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; -pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; -pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; -pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; -pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; -pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; -pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; -pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; -pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; -pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; -pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; -pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; -pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; -pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; -pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; -pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; -pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; -pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; -pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; -pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; -pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; -pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; -pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; -pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = - *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; -pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; -pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; -pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; -pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; -pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } -pub type specifiedParams_PTR = *mut specifiedParams; -pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -7031,34 +6844,6 @@ fn bindgen_test_layout_CK_XEDDSA_PARAMS() { ) ); } -pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; -pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; -pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; -pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; -pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; -pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { diff --git a/cryptoki-sys/vendor/pkcs11.h b/cryptoki-sys/vendor/pkcs11.h index ef3e572d..388e07e2 100644 --- a/cryptoki-sys/vendor/pkcs11.h +++ b/cryptoki-sys/vendor/pkcs11.h @@ -7,6 +7,10 @@ #define CRYPTOKI_VERSION_MINOR 0 #define CRYPTOKI_VERSION_AMENDMENT 0 +#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32) +#pragma pack(push, cryptoki, 1) +#endif + /* Basic types */ typedef unsigned char CK_BBOOL; typedef unsigned char CK_BYTE; @@ -2338,4 +2342,8 @@ struct CK_FUNCTION_LIST { }; +#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32) +#pragma pack(pop, cryptoki) +#endif + #endif From 5abd1a65a12806c7b25e24ade77fe1037c8efc8b Mon Sep 17 00:00:00 2001 From: Joe Rozner Date: Tue, 4 Feb 2025 12:46:02 -0800 Subject: [PATCH 2/3] Update bindgen and use clang_macro_fallback Signed-off-by: Joe Rozner --- Cargo.lock | 153 +- cryptoki-sys/Cargo.toml | 2 +- cryptoki-sys/build.rs | 4 +- .../src/bindings/aarch64-apple-darwin.rs | 9179 ++++------------- .../src/bindings/aarch64-unknown-linux-gnu.rs | 9179 ++++------------- .../src/bindings/arm-unknown-linux-gnueabi.rs | 9179 ++++------------- cryptoki-sys/src/bindings/generic.rs | 218 +- .../src/bindings/i686-unknown-linux-gnu.rs | 9179 ++++------------- .../bindings/loongarch64-unknown-linux-gnu.rs | 9179 ++++------------- .../bindings/powerpc64-unknown-linux-gnu.rs | 9179 ++++------------- .../src/bindings/x86_64-apple-darwin.rs | 9179 ++++------------- .../src/bindings/x86_64-pc-windows-msvc.rs | 9179 ++++------------- .../src/bindings/x86_64-unknown-freebsd.rs | 9179 ++++------------- .../src/bindings/x86_64-unknown-linux-gnu.rs | 9179 ++++------------- 14 files changed, 19251 insertions(+), 72916 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8affd6f3..79734fff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,16 +19,14 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bindgen" -version = "0.69.4" +version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ "bitflags 2.4.2", "cexpr", "clang-sys", "itertools", - "lazy_static", - "lazycell", "log", "prettyplease", "proc-macro2", @@ -37,7 +35,6 @@ dependencies = [ "rustc-hash", "shlex", "syn 2.0.50", - "which", ] [[package]] @@ -108,16 +105,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "glob" version = "0.3.1" @@ -130,15 +117,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "instant" version = "0.1.12" @@ -163,12 +141,6 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.153" @@ -192,15 +164,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-sys", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - [[package]] name = "lock_api" version = "0.4.11" @@ -248,12 +214,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - [[package]] name = "parking_lot" version = "0.11.2" @@ -357,19 +317,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -474,18 +421,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -514,16 +449,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", + "windows-targets", ] [[package]] @@ -532,28 +458,13 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -562,84 +473,42 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - [[package]] name = "windows_i686_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - [[package]] name = "windows_i686_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - [[package]] name = "zeroize" version = "1.7.0" diff --git a/cryptoki-sys/Cargo.toml b/cryptoki-sys/Cargo.toml index 198b71b7..d98c77f0 100644 --- a/cryptoki-sys/Cargo.toml +++ b/cryptoki-sys/Cargo.toml @@ -13,7 +13,7 @@ documentation = "https://docs.rs/crate/cryptoki-sys" rust-version = "1.66.0" [build-dependencies] -bindgen = { version = "0.69.4", optional = true } +bindgen = { version = "0.70.1", optional = true } [dependencies] libloading = "0.7.0" diff --git a/cryptoki-sys/build.rs b/cryptoki-sys/build.rs index 3bc817d5..533a433c 100644 --- a/cryptoki-sys/build.rs +++ b/cryptoki-sys/build.rs @@ -103,7 +103,9 @@ mod generate { .derive_debug(true) // Derive the `Default` trait for the generated structs where possible. .derive_default(true) - .parse_callbacks(Box::new(CargoCallbacks)); + .parse_callbacks(Box::new(CargoCallbacks)) + // Support function like macros + .clang_macro_fallback(); let bindings = builder.generate().expect("Unable to generate bindings"); diff --git a/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs b/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs +++ b/cryptoki-sys/src/bindings/aarch64-apple-darwin.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/aarch64-unknown-linux-gnu.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs b/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs index dafb9c05..8457188b 100644 --- a/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs +++ b/cryptoki-sys/src/bindings/arm-unknown-linux-gnueabi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 4usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 8usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 4usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 12usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 20usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 4usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 8usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 76usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 76usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 36usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 40usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 4usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 8usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 4usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 8usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 4usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 4usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 8usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 102usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 104usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 100usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 102usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 142usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 160usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 100usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 108usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 116usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 124usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 132usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 140usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 142usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 144usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 20usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 4usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 20usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 12usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 20usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 24usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 20usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 4usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 12usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 4usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 12usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 20usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 28usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 12usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 4usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 12usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 4usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 12usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 16usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 32usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 36usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 4usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 8usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 4usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 12usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 20usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 4usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 20usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 4usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 12usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 16usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 4usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 12usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 16usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 4usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 12usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 20usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 28usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 4usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 12usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 20usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 4usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 4usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 8usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 4usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 12usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 4usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 8usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 4usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 4usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 4usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 12usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 20usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 12usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 20usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 28usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 32usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 12usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 20usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 28usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 32usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 4usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 8usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 4usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 4usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 12usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 4usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 4usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 4usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 12usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 16usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 4usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 8usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 12usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 8usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 44usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 4usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 12usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 20usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 28usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 36usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 40usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 4usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 12usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 20usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 28usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 36usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 44usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 52usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 4usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 4usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 8usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 4usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 12usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 20usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 24usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 4usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 12usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 16usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 4usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 12usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 20usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 28usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 4usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 12usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 20usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 28usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 4usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 12usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 20usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 24usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 4usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 12usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 20usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 16usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 32usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 36usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 4usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 12usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 20usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 4usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 12usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 12usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 32usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 16usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 4usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 12usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 28usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 32usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 4usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 4usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 12usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 20usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 4usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 12usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 36usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 16usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 20usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 8usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 4usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 12usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 44usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 12usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 20usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 40usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 4usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 20usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 4usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 12usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 20usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 24usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 372usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 276usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 284usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 292usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 300usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 308usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 316usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 332usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 340usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 356usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 364usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 372usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 4usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 12usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 20usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 28usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 36usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 44usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 52usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 60usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 68usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 76usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 84usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 92usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 100usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 108usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 116usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 124usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 132usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 140usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 148usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 156usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 164usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 172usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 180usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 188usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 196usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 204usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 212usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 220usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 228usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 236usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 244usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 252usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 260usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 268usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 276usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 284usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 292usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 300usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 308usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 316usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 324usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 332usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 340usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 348usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 356usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 364usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 368usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 276usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 276usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 4usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 12usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 20usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 28usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 36usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 44usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 52usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 60usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 68usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 76usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 84usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 92usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 100usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 108usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 116usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 124usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 132usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 140usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 148usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 156usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 164usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 172usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 180usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 188usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 196usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 204usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 212usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 220usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 228usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 236usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 244usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 252usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 260usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 268usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 272usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/generic.rs b/cryptoki-sys/src/bindings/generic.rs index 6b1868cf..60276027 100644 --- a/cryptoki-sys/src/bindings/generic.rs +++ b/cryptoki-sys/src/bindings/generic.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -1143,11 +1205,136 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] @@ -2199,6 +2386,34 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[cfg_attr(windows, repr(packed))] #[derive(Debug, Copy, Clone)] @@ -3213,7 +3428,6 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -extern crate libloading; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs index dafb9c05..8457188b 100644 --- a/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/i686-unknown-linux-gnu.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 4usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 8usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 4usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 12usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 20usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 4usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 8usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 76usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 76usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 36usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 40usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 72usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 4usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 8usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 4usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 8usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 4usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 4usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 8usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 102usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 104usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 100usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 102usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 142usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 160usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 100usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 108usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 116usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 124usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 132usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 140usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 142usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 144usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 20usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 4usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 20usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 12usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 20usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 24usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 20usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 4usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 12usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 4usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 12usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 20usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 28usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 12usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 4usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 12usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 4usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 12usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 16usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 32usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 36usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 4usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 8usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 4usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 12usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 20usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 4usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 20usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 4usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 12usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 16usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 4usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 12usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 16usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 4usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 12usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 20usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 28usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 4usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 12usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 20usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 4usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 4usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 8usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 4usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 12usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 4usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 8usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 4usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 4usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 4usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 12usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 20usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 12usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 20usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 28usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 32usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 12usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 20usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 28usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 32usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 4usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 8usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 4usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 4usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 12usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 4usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 4usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 4usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 12usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 16usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 4usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 8usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 4usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 12usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 8usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 20usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 44usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 4usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 12usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 20usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 28usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 36usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 40usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 4usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 12usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 20usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 28usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 36usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 44usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 52usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 4usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 4usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 8usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 4usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 12usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 20usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 24usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 4usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 12usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 16usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 4usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 12usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 20usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 28usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 4usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 12usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 20usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 28usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 4usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 12usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 20usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 24usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 4usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 12usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 20usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 16usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 32usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 20usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 28usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 36usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 4usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 12usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 20usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 4usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 12usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 12usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 32usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 16usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 4usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 12usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 28usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 32usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 4usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 4usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 12usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 20usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 4usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 12usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 36usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 16usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 20usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 8usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 4usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 12usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 44usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 12usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 20usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 40usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 4usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 20usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 4usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 12usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 20usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 24usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 372usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 276usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 284usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 292usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 300usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 308usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 316usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 332usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 340usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 356usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 364usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 372usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 4usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 12usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 20usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 28usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 36usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 44usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 52usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 60usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 68usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 76usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 84usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 92usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 100usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 108usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 116usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 124usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 132usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 140usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 148usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 156usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 164usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 172usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 180usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 188usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 196usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 204usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 212usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 220usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 228usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 236usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 244usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 252usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 260usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 268usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 276usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 284usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 292usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 300usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 308usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 316usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 324usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 332usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 340usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 348usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 356usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 364usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 368usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 276usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 244usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 252usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 268usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 276usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 4usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 12usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 20usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 28usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 36usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 44usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 52usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 60usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 68usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 76usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 84usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 92usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 100usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 108usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 116usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 124usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 132usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 140usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 148usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 156usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 164usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 172usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 180usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 188usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 196usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 204usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 212usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 220usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 228usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 236usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 244usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 252usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 260usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 268usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 272usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/loongarch64-unknown-linux-gnu.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/powerpc64-unknown-linux-gnu.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs b/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs +++ b/cryptoki-sys/src/bindings/x86_64-apple-darwin.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs b/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs index 45fddd56..5431e621 100644 --- a/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs +++ b/cryptoki-sys/src/bindings/x86_64-pc-windows-msvc.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 4usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 12usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 44usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 36usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 12usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 70usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 34usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 38usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 70usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 4usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 12usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 4usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 8usize]; +}; #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 4usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 8usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 12usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 102usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 104usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 100usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 102usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 142usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 160usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 100usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 108usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 116usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 124usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 132usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 140usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 142usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 144usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 12usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 28usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 4usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 12usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 28usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 4usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 12usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 20usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 32usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 4usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 12usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 28usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 12usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 20usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 52usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 4usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 12usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 20usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 28usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 36usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 48usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 4usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 12usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 16usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 4usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 12usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 20usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 20usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 28usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 36usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 40usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 52usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 4usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 20usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 28usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 36usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 48usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 13usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 13usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 1usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 5usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 12usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 20usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 28usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 12usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 28usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 4usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 24usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 12usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 20usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 24usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 38usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 38usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 2usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 6usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 10usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 18usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 22usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 26usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 34usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 33usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 25usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 33usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 1usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 5usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 13usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 21usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 25usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 13usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 9usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 13usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 1usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 9usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 12usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 20usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 4usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 12usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 20usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 28usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 32usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 52usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 12usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 20usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 36usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 44usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 4usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 12usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 20usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 36usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 44usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 4usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 12usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 4usize]; +}; #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 4usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 4usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 16usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 4usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 4usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 4usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 4usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 12usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 20usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 4usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 8usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 12usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 12usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 20usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 20usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 68usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 68usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 4usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 12usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 28usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 36usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 44usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 52usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 60usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 84usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 84usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 4usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 12usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 28usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 36usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 52usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 60usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 76usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 5usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 5usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 1usize]; +}; #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 9usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 9usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 4usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 5usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 4usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 20usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 28usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 32usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 28usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 4usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 20usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 33usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 25usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 29usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 33usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 12usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 20usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 21usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 25usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 29usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 33usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 25usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 29usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 33usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 12usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 20usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 21usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 25usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 29usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 36usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 4usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 12usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 20usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 28usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 32usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 4usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 12usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 20usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 28usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 32usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 28usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 28usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 20usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 20usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 28usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 36usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 40usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 52usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 4usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 20usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 28usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 36usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 48usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 4usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 12usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 24usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 12usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 20usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 45usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 45usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 4usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 12usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 13usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 37usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 24usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 52usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 52usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 4usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 12usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 40usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 48usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 12usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 4usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 8usize]; +}; #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 12usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 20usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 32usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 49usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 13usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 45usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 49usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 4usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 12usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 13usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 37usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 45usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 24usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 32usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 8usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 12usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 20usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 53usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 21usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 45usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 53usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 4usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 12usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 20usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 21usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 45usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 36usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 36usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 4usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 28usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 44usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 4usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 12usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 28usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 36usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 738usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 50usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 58usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 66usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 90usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 98usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 114usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 122usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 138usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 154usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 162usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 170usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 178usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 194usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 202usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 210usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 218usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 226usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 234usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 242usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 250usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 258usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 266usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 274usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 282usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 290usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 298usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 306usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 314usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 322usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 330usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 338usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 346usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 354usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 362usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 370usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 378usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 386usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 394usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 402usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 410usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 418usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 426usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 434usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 442usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 450usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 458usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 466usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 474usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 482usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 490usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 498usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 506usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 514usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 522usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 530usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 538usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 546usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 554usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 562usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 570usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 578usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 586usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 594usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 602usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 610usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 618usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 626usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 634usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 642usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 650usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 658usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 666usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 674usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 682usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 690usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 698usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 706usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 714usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 722usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 730usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 738usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 2usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 10usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 18usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 26usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 34usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 42usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 50usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 58usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 66usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 74usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 82usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 90usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 98usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 106usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 114usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 122usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 130usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 138usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 146usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 154usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 162usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 170usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 178usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 186usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 194usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 202usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 210usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 218usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 226usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 234usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 242usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 250usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 258usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 266usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 274usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 282usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 290usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 298usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 306usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 314usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 322usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 330usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 338usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 346usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 354usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 362usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 370usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 378usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 386usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 394usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 402usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 410usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 418usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 426usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 434usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 442usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 450usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 458usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 466usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 474usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 482usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 490usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 498usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 506usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 514usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 522usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 530usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 538usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 546usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 554usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 562usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 570usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 578usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 586usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 594usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 602usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 610usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 618usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 626usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 634usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 642usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 650usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 658usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 666usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 674usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 682usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 690usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 698usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 706usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 714usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 722usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 730usize]; +}; #[repr(C, packed)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 546usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 42usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 50usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 58usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 66usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 74usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 90usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 98usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 114usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 122usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 138usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 154usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 162usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 170usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 178usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 194usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 202usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 210usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 218usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 226usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 234usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 242usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 250usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 258usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 266usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 274usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 282usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 290usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 298usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 306usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 314usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 322usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 330usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 338usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 346usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 354usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 362usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 370usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 378usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 386usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 394usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 402usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 410usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 418usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 426usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 434usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 442usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 450usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 458usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 466usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 474usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 482usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 490usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 498usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 506usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 514usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 522usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 530usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 538usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 546usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 2usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 10usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 18usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 26usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 34usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 42usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 50usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 58usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 66usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 74usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 82usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 90usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 98usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 106usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 114usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 122usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 130usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 138usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 146usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 154usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 162usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 170usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 178usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 186usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 194usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 202usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 210usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 218usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 226usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 234usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 242usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 250usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 258usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 266usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 274usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 282usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 290usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 298usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 306usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 314usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 322usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 330usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 338usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 346usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 354usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 362usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 370usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 378usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 386usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 394usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 402usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 410usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 418usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 426usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 434usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 442usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 450usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 458usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 466usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 474usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 482usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 490usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 498usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 506usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 514usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 522usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 530usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 538usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs b/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs +++ b/cryptoki-sys/src/bindings/x86_64-unknown-freebsd.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< diff --git a/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs b/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs index 8de3c52d..abd6f480 100644 --- a/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs +++ b/cryptoki-sys/src/bindings/x86_64-unknown-linux-gnu.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +/* automatically generated by rust-bindgen 0.70.1 */ pub const CRYPTOKI_VERSION_MAJOR: CK_BYTE = 3; pub const CRYPTOKI_VERSION_MINOR: CK_BYTE = 0; @@ -926,38 +926,100 @@ pub type CK_ULONG_PTR = *mut CK_ULONG; pub type CK_VOID_PTR = *mut ::std::os::raw::c_void; pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void; pub type CK_ATTRIBUTE_TYPE = CK_ULONG; +pub type CK_ATTRIBUTE_TYPE_PTR = *mut CK_ATTRIBUTE_TYPE; pub type CK_CERTIFICATE_CATEGORY = CK_ULONG; +pub type CK_CERTIFICATE_CATEGORY_PTR = *mut CK_CERTIFICATE_CATEGORY; pub type CK_CERTIFICATE_TYPE = CK_ULONG; +pub type CK_CERTIFICATE_TYPE_PTR = *mut CK_CERTIFICATE_TYPE; pub type CK_EC_KDF_TYPE = CK_ULONG; +pub type CK_EC_KDF_TYPE_PTR = *mut CK_EC_KDF_TYPE; pub type CK_EXTRACT_PARAMS = CK_ULONG; +pub type CK_EXTRACT_PARAMS_PTR = *mut CK_EXTRACT_PARAMS; pub type CK_FLAGS = CK_ULONG; +pub type CK_FLAGS_PTR = *mut CK_FLAGS; pub type CK_GENERATOR_FUNCTION = CK_ULONG; +pub type CK_GENERATOR_FUNCTION_PTR = *mut CK_GENERATOR_FUNCTION; pub type CK_HW_FEATURE_TYPE = CK_ULONG; +pub type CK_HW_FEATURE_TYPE_PTR = *mut CK_HW_FEATURE_TYPE; pub type CK_JAVA_MIDP_SECURITY_DOMAIN = CK_ULONG; +pub type CK_JAVA_MIDP_SECURITY_DOMAIN_PTR = *mut CK_JAVA_MIDP_SECURITY_DOMAIN; pub type CK_KEY_TYPE = CK_ULONG; +pub type CK_KEY_TYPE_PTR = *mut CK_KEY_TYPE; pub type CK_MAC_GENERAL_PARAMS = CK_ULONG; +pub type CK_MAC_GENERAL_PARAMS_PTR = *mut CK_MAC_GENERAL_PARAMS; pub type CK_MECHANISM_TYPE = CK_ULONG; +pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE; pub type CK_NOTIFICATION = CK_ULONG; +pub type CK_NOTIFICATION_PTR = *mut CK_NOTIFICATION; pub type CK_OBJECT_CLASS = CK_ULONG; +pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS; pub type CK_OBJECT_HANDLE = CK_ULONG; +pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE; pub type CK_OTP_PARAM_TYPE = CK_ULONG; +pub type CK_OTP_PARAM_TYPE_PTR = *mut CK_OTP_PARAM_TYPE; pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR = + *mut CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE; pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE = CK_ULONG; +pub type CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR = *mut CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE; pub type CK_PRF_DATA_TYPE = CK_ULONG; +pub type CK_PRF_DATA_TYPE_PTR = *mut CK_PRF_DATA_TYPE; pub type CK_PROFILE_ID = CK_ULONG; +pub type CK_PROFILE_ID_PTR = *mut CK_PROFILE_ID; pub type CK_RC2_PARAMS = CK_ULONG; +pub type CK_RC2_PARAMS_PTR = *mut CK_RC2_PARAMS; pub type CK_RSA_PKCS_MGF_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_MGF_TYPE_PTR = *mut CK_RSA_PKCS_MGF_TYPE; pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = CK_ULONG; +pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR = *mut CK_RSA_PKCS_OAEP_SOURCE_TYPE; pub type CK_RV = CK_ULONG; +pub type CK_RV_PTR = *mut CK_RV; pub type CK_SESSION_HANDLE = CK_ULONG; +pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE; pub type CK_SLOT_ID = CK_ULONG; +pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID; pub type CK_SP800_108_DKM_LENGTH_METHOD = CK_ULONG; +pub type CK_SP800_108_DKM_LENGTH_METHOD_PTR = *mut CK_SP800_108_DKM_LENGTH_METHOD; pub type CK_STATE = CK_ULONG; +pub type CK_STATE_PTR = *mut CK_STATE; pub type CK_USER_TYPE = CK_ULONG; +pub type CK_USER_TYPE_PTR = *mut CK_USER_TYPE; pub type CK_X2RATCHET_KDF_TYPE = CK_ULONG; +pub type CK_X2RATCHET_KDF_TYPE_PTR = *mut CK_X2RATCHET_KDF_TYPE; pub type CK_X3DH_KDF_TYPE = CK_ULONG; +pub type CK_X3DH_KDF_TYPE_PTR = *mut CK_X3DH_KDF_TYPE; pub type CK_X9_42_DH_KDF_TYPE = CK_ULONG; +pub type CK_X9_42_DH_KDF_TYPE_PTR = *mut CK_X9_42_DH_KDF_TYPE; pub type CK_XEDDSA_HASH_TYPE = CK_ULONG; +pub type CK_XEDDSA_HASH_TYPE_PTR = *mut CK_XEDDSA_HASH_TYPE; +pub type CK_ATTRIBUTE_PTR = *mut CK_ATTRIBUTE; +pub type CK_ATTRIBUTE_PTR_PTR = *mut *mut CK_ATTRIBUTE; +pub type CK_C_INITIALIZE_ARGS_PTR = *mut CK_C_INITIALIZE_ARGS; +pub type CK_C_INITIALIZE_ARGS_PTR_PTR = *mut *mut CK_C_INITIALIZE_ARGS; +pub type CK_DATE_PTR = *mut CK_DATE; +pub type CK_DATE_PTR_PTR = *mut *mut CK_DATE; +pub type CK_DERIVED_KEY_PTR = *mut CK_DERIVED_KEY; +pub type CK_DERIVED_KEY_PTR_PTR = *mut *mut CK_DERIVED_KEY; +pub type CK_FUNCTION_LIST_PTR = *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut CK_FUNCTION_LIST; +pub type CK_FUNCTION_LIST_3_0_PTR = *mut CK_FUNCTION_LIST_3_0; +pub type CK_FUNCTION_LIST_3_0_PTR_PTR = *mut *mut CK_FUNCTION_LIST_3_0; +pub type CK_INFO_PTR = *mut CK_INFO; +pub type CK_INFO_PTR_PTR = *mut *mut CK_INFO; +pub type CK_INTERFACE_PTR = *mut CK_INTERFACE; +pub type CK_INTERFACE_PTR_PTR = *mut *mut CK_INTERFACE; +pub type CK_MECHANISM_PTR = *mut CK_MECHANISM; +pub type CK_MECHANISM_PTR_PTR = *mut *mut CK_MECHANISM; +pub type CK_MECHANISM_INFO_PTR = *mut CK_MECHANISM_INFO; +pub type CK_MECHANISM_INFO_PTR_PTR = *mut *mut CK_MECHANISM_INFO; +pub type CK_SESSION_INFO_PTR = *mut CK_SESSION_INFO; +pub type CK_SESSION_INFO_PTR_PTR = *mut *mut CK_SESSION_INFO; +pub type CK_SLOT_INFO_PTR = *mut CK_SLOT_INFO; +pub type CK_SLOT_INFO_PTR_PTR = *mut *mut CK_SLOT_INFO; +pub type CK_TOKEN_INFO_PTR = *mut CK_TOKEN_INFO; +pub type CK_TOKEN_INFO_PTR_PTR = *mut *mut CK_TOKEN_INFO; +pub type CK_VERSION_PTR = *mut CK_VERSION; +pub type CK_VERSION_PTR_PTR = *mut *mut CK_VERSION; pub type CK_NOTIFY = ::std::option::Option< unsafe extern "C" fn( arg1: CK_SESSION_HANDLE, @@ -980,51 +1042,16 @@ pub struct CK_ATTRIBUTE { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ATTRIBUTE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ATTRIBUTE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ATTRIBUTE), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ATTRIBUTE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_ATTRIBUTE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ATTRIBUTE::type_"][::std::mem::offset_of!(CK_ATTRIBUTE, type_) - 0usize]; + ["Offset of field: CK_ATTRIBUTE::pValue"] + [::std::mem::offset_of!(CK_ATTRIBUTE, pValue) - 8usize]; + ["Offset of field: CK_ATTRIBUTE::ulValueLen"] + [::std::mem::offset_of!(CK_ATTRIBUTE, ulValueLen) - 16usize]; +}; impl Default for CK_ATTRIBUTE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1044,81 +1071,23 @@ pub struct CK_C_INITIALIZE_ARGS { pub flags: CK_FLAGS, pub pReserved: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_CK_C_INITIALIZE_ARGS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_C_INITIALIZE_ARGS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).CreateMutex) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(CreateMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DestroyMutex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(DestroyMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).LockMutex) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(LockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).UnlockMutex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(UnlockMutex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReserved) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_C_INITIALIZE_ARGS), - "::", - stringify!(pReserved) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_C_INITIALIZE_ARGS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_C_INITIALIZE_ARGS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::CreateMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, CreateMutex) - 0usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::DestroyMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, DestroyMutex) - 8usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::LockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, LockMutex) - 16usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::UnlockMutex"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, UnlockMutex) - 24usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::flags"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, flags) - 32usize]; + ["Offset of field: CK_C_INITIALIZE_ARGS::pReserved"] + [::std::mem::offset_of!(CK_C_INITIALIZE_ARGS, pReserved) - 40usize]; +}; impl Default for CK_C_INITIALIZE_ARGS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1135,51 +1104,14 @@ pub struct CK_DATE { pub month: [CK_CHAR; 2usize], pub day: [CK_CHAR; 2usize], } -#[test] -fn bindgen_test_layout_CK_DATE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_DATE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_DATE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(year) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(month) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(CK_DATE), - "::", - stringify!(day) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DATE"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_DATE"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_DATE::year"][::std::mem::offset_of!(CK_DATE, year) - 0usize]; + ["Offset of field: CK_DATE::month"][::std::mem::offset_of!(CK_DATE, month) - 4usize]; + ["Offset of field: CK_DATE::day"][::std::mem::offset_of!(CK_DATE, day) - 6usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_DERIVED_KEY { @@ -1187,51 +1119,17 @@ pub struct CK_DERIVED_KEY { pub ulAttributeCount: CK_ULONG, pub phKey: *mut CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_DERIVED_KEY() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DERIVED_KEY)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTemplate) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(pTemplate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAttributeCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(ulAttributeCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DERIVED_KEY), - "::", - stringify!(phKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DERIVED_KEY"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DERIVED_KEY"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DERIVED_KEY::pTemplate"] + [::std::mem::offset_of!(CK_DERIVED_KEY, pTemplate) - 0usize]; + ["Offset of field: CK_DERIVED_KEY::ulAttributeCount"] + [::std::mem::offset_of!(CK_DERIVED_KEY, ulAttributeCount) - 8usize]; + ["Offset of field: CK_DERIVED_KEY::phKey"] + [::std::mem::offset_of!(CK_DERIVED_KEY, phKey) - 16usize]; +}; impl Default for CK_DERIVED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1247,41 +1145,13 @@ pub struct CK_VERSION { pub major: CK_BYTE, pub minor: CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_VERSION() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(CK_VERSION)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(CK_VERSION)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_VERSION), - "::", - stringify!(minor) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_VERSION"][::std::mem::size_of::() - 2usize]; + ["Alignment of CK_VERSION"][::std::mem::align_of::() - 1usize]; + ["Offset of field: CK_VERSION::major"][::std::mem::offset_of!(CK_VERSION, major) - 0usize]; + ["Offset of field: CK_VERSION::minor"][::std::mem::offset_of!(CK_VERSION, minor) - 1usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_INFO { @@ -1291,71 +1161,20 @@ pub struct CK_INFO { pub libraryDescription: [CK_UTF8CHAR; 32usize], pub libraryVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cryptokiVersion) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(cryptokiVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryDescription) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).libraryVersion) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_INFO), - "::", - stringify!(libraryVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INFO"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INFO::cryptokiVersion"] + [::std::mem::offset_of!(CK_INFO, cryptokiVersion) - 0usize]; + ["Offset of field: CK_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_INFO, manufacturerID) - 2usize]; + ["Offset of field: CK_INFO::flags"][::std::mem::offset_of!(CK_INFO, flags) - 40usize]; + ["Offset of field: CK_INFO::libraryDescription"] + [::std::mem::offset_of!(CK_INFO, libraryDescription) - 48usize]; + ["Offset of field: CK_INFO::libraryVersion"] + [::std::mem::offset_of!(CK_INFO, libraryVersion) - 80usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_INTERFACE { @@ -1363,51 +1182,16 @@ pub struct CK_INTERFACE { pub pFunctionList: *mut ::std::os::raw::c_void, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_INTERFACE() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_INTERFACE)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInterfaceName) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pInterfaceName) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFunctionList) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(pFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_INTERFACE), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_INTERFACE"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_INTERFACE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_INTERFACE::pInterfaceName"] + [::std::mem::offset_of!(CK_INTERFACE, pInterfaceName) - 0usize]; + ["Offset of field: CK_INTERFACE::pFunctionList"] + [::std::mem::offset_of!(CK_INTERFACE, pFunctionList) - 8usize]; + ["Offset of field: CK_INTERFACE::flags"][::std::mem::offset_of!(CK_INTERFACE, flags) - 16usize]; +}; impl Default for CK_INTERFACE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1424,51 +1208,17 @@ pub struct CK_MECHANISM { pub pParameter: *mut ::std::os::raw::c_void, pub ulParameterLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_MECHANISM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(mechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParameter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(pParameter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulParameterLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM), - "::", - stringify!(ulParameterLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM::mechanism"] + [::std::mem::offset_of!(CK_MECHANISM, mechanism) - 0usize]; + ["Offset of field: CK_MECHANISM::pParameter"] + [::std::mem::offset_of!(CK_MECHANISM, pParameter) - 8usize]; + ["Offset of field: CK_MECHANISM::ulParameterLen"] + [::std::mem::offset_of!(CK_MECHANISM, ulParameterLen) - 16usize]; +}; impl Default for CK_MECHANISM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1485,51 +1235,17 @@ pub struct CK_MECHANISM_INFO { pub ulMaxKeySize: CK_ULONG, pub flags: CK_FLAGS, } -#[test] -fn bindgen_test_layout_CK_MECHANISM_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_MECHANISM_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinKeySize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMinKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxKeySize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(ulMaxKeySize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_MECHANISM_INFO), - "::", - stringify!(flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_MECHANISM_INFO"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_MECHANISM_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMinKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMinKeySize) - 0usize]; + ["Offset of field: CK_MECHANISM_INFO::ulMaxKeySize"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, ulMaxKeySize) - 8usize]; + ["Offset of field: CK_MECHANISM_INFO::flags"] + [::std::mem::offset_of!(CK_MECHANISM_INFO, flags) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SESSION_INFO { @@ -1538,61 +1254,19 @@ pub struct CK_SESSION_INFO { pub flags: CK_FLAGS, pub ulDeviceError: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SESSION_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SESSION_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(slotID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDeviceError) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SESSION_INFO), - "::", - stringify!(ulDeviceError) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SESSION_INFO"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SESSION_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SESSION_INFO::slotID"] + [::std::mem::offset_of!(CK_SESSION_INFO, slotID) - 0usize]; + ["Offset of field: CK_SESSION_INFO::state"] + [::std::mem::offset_of!(CK_SESSION_INFO, state) - 8usize]; + ["Offset of field: CK_SESSION_INFO::flags"] + [::std::mem::offset_of!(CK_SESSION_INFO, flags) - 16usize]; + ["Offset of field: CK_SESSION_INFO::ulDeviceError"] + [::std::mem::offset_of!(CK_SESSION_INFO, ulDeviceError) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SLOT_INFO { @@ -1602,71 +1276,20 @@ pub struct CK_SLOT_INFO { pub hardwareVersion: CK_VERSION, pub firmwareVersion: CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SLOT_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SLOT_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).slotDescription) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(slotDescription) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(CK_SLOT_INFO), - "::", - stringify!(firmwareVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SLOT_INFO"][::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SLOT_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SLOT_INFO::slotDescription"] + [::std::mem::offset_of!(CK_SLOT_INFO, slotDescription) - 0usize]; + ["Offset of field: CK_SLOT_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_SLOT_INFO, manufacturerID) - 64usize]; + ["Offset of field: CK_SLOT_INFO::flags"][::std::mem::offset_of!(CK_SLOT_INFO, flags) - 96usize]; + ["Offset of field: CK_SLOT_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, hardwareVersion) - 104usize]; + ["Offset of field: CK_SLOT_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_SLOT_INFO, firmwareVersion) - 106usize]; +}; impl Default for CK_SLOT_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1698,206 +1321,177 @@ pub struct CK_TOKEN_INFO { pub firmwareVersion: CK_VERSION, pub utcTime: [CK_CHAR; 16usize], } -#[test] -fn bindgen_test_layout_CK_TOKEN_INFO() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TOKEN_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).manufacturerID) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(manufacturerID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).model) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(model) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).serialNumber) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(serialNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxSessionCount) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSessionCount) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxRwSessionCount) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRwSessionCount) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulRwSessionCount) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMaxPinLen) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMaxPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMinPinLen) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulMinPinLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPublicMemory) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePublicMemory) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePublicMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTotalPrivateMemory) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulTotalPrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulFreePrivateMemory) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(ulFreePrivateMemory) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hardwareVersion) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(hardwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).firmwareVersion) as usize - ptr as usize }, - 186usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(firmwareVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).utcTime) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(CK_TOKEN_INFO), - "::", - stringify!(utcTime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TOKEN_INFO"][::std::mem::size_of::() - 208usize]; + ["Alignment of CK_TOKEN_INFO"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TOKEN_INFO::label"] + [::std::mem::offset_of!(CK_TOKEN_INFO, label) - 0usize]; + ["Offset of field: CK_TOKEN_INFO::manufacturerID"] + [::std::mem::offset_of!(CK_TOKEN_INFO, manufacturerID) - 32usize]; + ["Offset of field: CK_TOKEN_INFO::model"] + [::std::mem::offset_of!(CK_TOKEN_INFO, model) - 64usize]; + ["Offset of field: CK_TOKEN_INFO::serialNumber"] + [::std::mem::offset_of!(CK_TOKEN_INFO, serialNumber) - 80usize]; + ["Offset of field: CK_TOKEN_INFO::flags"] + [::std::mem::offset_of!(CK_TOKEN_INFO, flags) - 96usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxSessionCount) - 104usize]; + ["Offset of field: CK_TOKEN_INFO::ulSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulSessionCount) - 112usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxRwSessionCount) - 120usize]; + ["Offset of field: CK_TOKEN_INFO::ulRwSessionCount"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulRwSessionCount) - 128usize]; + ["Offset of field: CK_TOKEN_INFO::ulMaxPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMaxPinLen) - 136usize]; + ["Offset of field: CK_TOKEN_INFO::ulMinPinLen"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulMinPinLen) - 144usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPublicMemory) - 152usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePublicMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePublicMemory) - 160usize]; + ["Offset of field: CK_TOKEN_INFO::ulTotalPrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulTotalPrivateMemory) - 168usize]; + ["Offset of field: CK_TOKEN_INFO::ulFreePrivateMemory"] + [::std::mem::offset_of!(CK_TOKEN_INFO, ulFreePrivateMemory) - 176usize]; + ["Offset of field: CK_TOKEN_INFO::hardwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, hardwareVersion) - 184usize]; + ["Offset of field: CK_TOKEN_INFO::firmwareVersion"] + [::std::mem::offset_of!(CK_TOKEN_INFO, firmwareVersion) - 186usize]; + ["Offset of field: CK_TOKEN_INFO::utcTime"] + [::std::mem::offset_of!(CK_TOKEN_INFO, utcTime) - 188usize]; +}; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_AES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR = *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CCM_PARAMS_PTR_PTR = *mut *mut CK_AES_CCM_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR = *mut CK_AES_CTR_PARAMS; +pub type CK_AES_CTR_PARAMS_PTR_PTR = *mut *mut CK_AES_CTR_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR = *mut CK_AES_GCM_PARAMS; +pub type CK_AES_GCM_PARAMS_PTR_PTR = *mut *mut CK_AES_GCM_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = + *mut *mut CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR = *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CAMELLIA_CTR_PARAMS_PTR_PTR = *mut *mut CK_CAMELLIA_CTR_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR = *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_CCM_MESSAGE_PARAMS; +pub type CK_CCM_PARAMS_PTR = *mut CK_CCM_PARAMS; +pub type CK_CCM_PARAMS_PTR_PTR = *mut *mut CK_CCM_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR = *mut CK_CHACHA20_PARAMS; +pub type CK_CHACHA20_PARAMS_PTR_PTR = *mut *mut CK_CHACHA20_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR = *mut CK_CMS_SIG_PARAMS; +pub type CK_CMS_SIG_PARAMS_PTR_PTR = *mut *mut CK_CMS_SIG_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_DES_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR = *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_DSA_PARAMETER_GEN_PARAM_PTR_PTR = *mut *mut CK_DSA_PARAMETER_GEN_PARAM; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR = *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_ECDH_AES_KEY_WRAP_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH1_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR = *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECDH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECDH2_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR = *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_ECMQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_ECMQV_DERIVE_PARAMS; +pub type CK_EDDSA_PARAMS_PTR = *mut CK_EDDSA_PARAMS; +pub type CK_EDDSA_PARAMS_PTR_PTR = *mut *mut CK_EDDSA_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR = *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_MESSAGE_PARAMS_PTR_PTR = *mut *mut CK_GCM_MESSAGE_PARAMS; +pub type CK_GCM_PARAMS_PTR = *mut CK_GCM_PARAMS; +pub type CK_GCM_PARAMS_PTR_PTR = *mut *mut CK_GCM_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR = *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_DERIVE_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR = *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_GOSTR3410_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_GOSTR3410_KEY_WRAP_PARAMS; +pub type CK_HKDF_PARAMS_PTR = *mut CK_HKDF_PARAMS; +pub type CK_HKDF_PARAMS_PTR_PTR = *mut *mut CK_HKDF_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR = *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEA_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_KEA_DERIVE_PARAMS; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_DERIVATION_STRING_DATA_PTR_PTR = *mut *mut CK_KEY_DERIVATION_STRING_DATA; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR = *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KEY_WRAP_SET_OAEP_PARAMS_PTR_PTR = *mut *mut CK_KEY_WRAP_SET_OAEP_PARAMS; +pub type CK_KIP_PARAMS_PTR = *mut CK_KIP_PARAMS; +pub type CK_KIP_PARAMS_PTR_PTR = *mut *mut CK_KIP_PARAMS; +pub type CK_OTP_PARAM_PTR = *mut CK_OTP_PARAM; +pub type CK_OTP_PARAM_PTR_PTR = *mut *mut CK_OTP_PARAM; +pub type CK_OTP_PARAMS_PTR = *mut CK_OTP_PARAMS; +pub type CK_OTP_PARAMS_PTR_PTR = *mut *mut CK_OTP_PARAMS; +pub type CK_OTP_SIGNATURE_INFO_PTR = *mut CK_OTP_SIGNATURE_INFO; +pub type CK_OTP_SIGNATURE_INFO_PTR_PTR = *mut *mut CK_OTP_SIGNATURE_INFO; +pub type CK_PBE_PARAMS_PTR = *mut CK_PBE_PARAMS; +pub type CK_PBE_PARAMS_PTR_PTR = *mut *mut CK_PBE_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR = *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR = *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PKCS5_PBKD2_PARAMS2_PTR_PTR = *mut *mut CK_PKCS5_PBKD2_PARAMS2; +pub type CK_PRF_DATA_PARAM_PTR = *mut CK_PRF_DATA_PARAM; +pub type CK_PRF_DATA_PARAM_PTR_PTR = *mut *mut CK_PRF_DATA_PARAM; +pub type CK_RC2_CBC_PARAMS_PTR = *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC2_CBC_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR = *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC2_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC2_MAC_GENERAL_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR = *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_CBC_PARAMS_PTR_PTR = *mut *mut CK_RC5_CBC_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR = *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_MAC_GENERAL_PARAMS_PTR_PTR = *mut *mut CK_RC5_MAC_GENERAL_PARAMS; +pub type CK_RC5_PARAMS_PTR = *mut CK_RC5_PARAMS; +pub type CK_RC5_PARAMS_PTR_PTR = *mut *mut CK_RC5_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR = *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_AES_KEY_WRAP_PARAMS_PTR_PTR = *mut *mut CK_RSA_AES_KEY_WRAP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_OAEP_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_OAEP_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_RSA_PKCS_PSS_PARAMS_PTR_PTR = *mut *mut CK_RSA_PKCS_PSS_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR = *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_CHACHA20_POLY1305_PARAMS_PTR_PTR = + *mut *mut CK_SALSA20_CHACHA20_POLY1305_PARAMS; +pub type CK_SALSA20_PARAMS_PTR = *mut CK_SALSA20_PARAMS; +pub type CK_SALSA20_PARAMS_PTR_PTR = *mut *mut CK_SALSA20_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SEED_CBC_ENCRYPT_DATA_PARAMS_PTR_PTR = *mut *mut CK_SEED_CBC_ENCRYPT_DATA_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR = *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_PRIVATE_WRAP_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR = *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SKIPJACK_RELAYX_PARAMS_PTR_PTR = *mut *mut CK_SKIPJACK_RELAYX_PARAMS; +pub type CK_SP800_108_COUNTER_FORMAT_PTR = *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_COUNTER_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_COUNTER_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR = *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_DKM_LENGTH_FORMAT_PTR_PTR = *mut *mut CK_SP800_108_DKM_LENGTH_FORMAT; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR = *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_FEEDBACK_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_FEEDBACK_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR = *mut CK_SP800_108_KDF_PARAMS; +pub type CK_SP800_108_KDF_PARAMS_PTR_PTR = *mut *mut CK_SP800_108_KDF_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR = *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_INITIALIZE_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_INITIALIZE_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR = *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X2RATCHET_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X2RATCHET_RESPOND_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR = *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_INITIATE_PARAMS_PTR_PTR = *mut *mut CK_X3DH_INITIATE_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR = *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X3DH_RESPOND_PARAMS_PTR_PTR = *mut *mut CK_X3DH_RESPOND_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH1_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH1_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR = *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_DH2_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_DH2_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR = *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_X9_42_MQV_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_X9_42_MQV_DERIVE_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR = *mut CK_XEDDSA_PARAMS; +pub type CK_XEDDSA_PARAMS_PTR_PTR = *mut *mut CK_XEDDSA_PARAMS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct specifiedParams { _unused: [u8; 0], } +pub type specifiedParams_PTR = *mut specifiedParams; +pub type specifiedParams_PTR_PTR = *mut *mut specifiedParams; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { @@ -1905,52 +1499,19 @@ pub struct CK_AES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_AES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_AES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_AES_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_AES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1970,81 +1531,23 @@ pub struct CK_AES_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_AES_CCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_AES_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_AES_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2060,41 +1563,15 @@ pub struct CK_AES_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_AES_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_AES_CTR_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_AES_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_AES_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_AES_GCM_PARAMS { @@ -2105,81 +1582,23 @@ pub struct CK_AES_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_AES_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_AES_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_AES_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_AES_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_AES_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pIv"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_AES_GCM_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_AES_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_AES_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_AES_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2196,52 +1615,19 @@ pub struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_ARIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ARIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_ARIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2258,55 +1644,19 @@ pub struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2322,42 +1672,16 @@ pub struct CK_CAMELLIA_CTR_PARAMS { pub ulCounterBits: CK_ULONG, pub cb: [CK_BYTE; 16usize], } -#[test] -fn bindgen_test_layout_CK_CAMELLIA_CTR_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CAMELLIA_CTR_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCounterBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(ulCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CAMELLIA_CTR_PARAMS), - "::", - stringify!(cb) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CAMELLIA_CTR_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_CAMELLIA_CTR_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::ulCounterBits"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, ulCounterBits) - 0usize]; + ["Offset of field: CK_CAMELLIA_CTR_PARAMS::cb"] + [::std::mem::offset_of!(CK_CAMELLIA_CTR_PARAMS, cb) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_CCM_MESSAGE_PARAMS { @@ -2369,92 +1693,26 @@ pub struct CK_CCM_MESSAGE_PARAMS { pub pMAC: *mut CK_BYTE, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceFixedBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulNonceFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nonceGenerator) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(nonceGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMAC) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(pMAC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_MESSAGE_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_CCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulNonceFixedBits"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulNonceFixedBits) - 24usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::nonceGenerator"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, nonceGenerator) - 32usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::pMAC"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, pMAC) - 40usize]; + ["Offset of field: CK_CCM_MESSAGE_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_MESSAGE_PARAMS, ulMACLen) - 48usize]; +}; impl Default for CK_CCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2474,81 +1732,22 @@ pub struct CK_CCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulMACLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulDataLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMACLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CCM_PARAMS), - "::", - stringify!(ulMACLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_CCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulDataLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulDataLen) - 0usize]; + ["Offset of field: CK_CCM_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CCM_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_CCM_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulNonceLen) - 16usize]; + ["Offset of field: CK_CCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_CCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_CCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_CCM_PARAMS::ulMACLen"] + [::std::mem::offset_of!(CK_CCM_PARAMS, ulMACLen) - 40usize]; +}; impl Default for CK_CCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2566,61 +1765,19 @@ pub struct CK_CHACHA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CHACHA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CHACHA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).blockCounterBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(blockCounterBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CHACHA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CHACHA20_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_CHACHA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_CHACHA20_PARAMS::blockCounterBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, blockCounterBits) - 8usize]; + ["Offset of field: CK_CHACHA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, pNonce) - 16usize]; + ["Offset of field: CK_CHACHA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_CHACHA20_PARAMS, ulNonceBits) - 24usize]; +}; impl Default for CK_CHACHA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2642,101 +1799,27 @@ pub struct CK_CMS_SIG_PARAMS { pub pRequiredAttributes: *mut CK_BYTE, pub ulRequiredAttributesLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_CMS_SIG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_CMS_SIG_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).certificateHandle) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(certificateHandle) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSigningMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pSigningMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDigestMechanism) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pDigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContentType) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pContentType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequestedAttributes) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequestedAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequestedAttributesLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequestedAttributesLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRequiredAttributes) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(pRequiredAttributes) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRequiredAttributesLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_CMS_SIG_PARAMS), - "::", - stringify!(ulRequiredAttributesLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_CMS_SIG_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_CMS_SIG_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::certificateHandle"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, certificateHandle) - 0usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pSigningMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pSigningMechanism) - 8usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pDigestMechanism"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pDigestMechanism) - 16usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pContentType"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pContentType) - 24usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequestedAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequestedAttributes) - 32usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequestedAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequestedAttributesLen) - 40usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::pRequiredAttributes"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, pRequiredAttributes) - 48usize]; + ["Offset of field: CK_CMS_SIG_PARAMS::ulRequiredAttributesLen"] + [::std::mem::offset_of!(CK_CMS_SIG_PARAMS, ulRequiredAttributesLen) - 56usize]; +}; impl Default for CK_CMS_SIG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2753,52 +1836,19 @@ pub struct CK_DES_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DES_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DES_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_DES_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData) - 8usize]; + ["Offset of field: CK_DES_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_DES_CBC_ENCRYPT_DATA_PARAMS, length) - 16usize]; +}; impl Default for CK_DES_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2816,62 +1866,21 @@ pub struct CK_DSA_PARAMETER_GEN_PARAM { pub ulSeedLen: CK_ULONG, pub ulIndex: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_DSA_PARAMETER_GEN_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_DSA_PARAMETER_GEN_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(hash) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIndex) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_DSA_PARAMETER_GEN_PARAM), - "::", - stringify!(ulIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_DSA_PARAMETER_GEN_PARAM"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::hash"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, hash) - 0usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::pSeed"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, pSeed) - 8usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulSeedLen"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulSeedLen) - 16usize]; + ["Offset of field: CK_DSA_PARAMETER_GEN_PARAM::ulIndex"] + [::std::mem::offset_of!(CK_DSA_PARAMETER_GEN_PARAM, ulIndex) - 24usize]; +}; impl Default for CK_DSA_PARAMETER_GEN_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2889,62 +1898,21 @@ pub struct CK_ECDH_AES_KEY_WRAP_PARAMS { pub ulSharedDataLen: CK_ULONG, pub pSharedData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pSharedData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_ECDH_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, kdf) - 8usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, ulSharedDataLen) - 16usize]; + ["Offset of field: CK_ECDH_AES_KEY_WRAP_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH_AES_KEY_WRAP_PARAMS, pSharedData) - 24usize]; +}; impl Default for CK_ECDH_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2963,72 +1931,22 @@ pub struct CK_ECDH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH1_DERIVE_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_ECDH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_ECDH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3051,112 +1969,30 @@ pub struct CK_ECDH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_ECDH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECDH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECDH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECDH2_DERIVE_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_ECDH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECDH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECDH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_ECDH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3180,122 +2016,32 @@ pub struct CK_ECMQV_DERIVE_PARAMS { pub pPublicData2: *mut CK_BYTE, pub publicKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_ECMQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_ECMQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSharedDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulSharedDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSharedData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pSharedData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_ECMQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_ECMQV_DERIVE_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_ECMQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulSharedDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulSharedDataLen) - 8usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pSharedData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pSharedData) - 16usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, pPublicData2) - 64usize]; + ["Offset of field: CK_ECMQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_ECMQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_ECMQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3312,51 +2058,17 @@ pub struct CK_EDDSA_PARAMS { pub ulContextDataLen: CK_ULONG, pub pContextData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_EDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_EDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).phFlag) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(phFlag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(ulContextDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_EDDSA_PARAMS), - "::", - stringify!(pContextData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_EDDSA_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_EDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::phFlag"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, phFlag) - 0usize]; + ["Offset of field: CK_EDDSA_PARAMS::ulContextDataLen"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, ulContextDataLen) - 8usize]; + ["Offset of field: CK_EDDSA_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_EDDSA_PARAMS, pContextData) - 16usize]; +}; impl Default for CK_EDDSA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3376,82 +2088,24 @@ pub struct CK_GCM_MESSAGE_PARAMS { pub pTag: *mut CK_BYTE, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_MESSAGE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_MESSAGE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvFixedBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulIvFixedBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ivGenerator) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ivGenerator) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(pTag) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_MESSAGE_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_MESSAGE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_MESSAGE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pIv"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulIvFixedBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulIvFixedBits) - 16usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ivGenerator"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ivGenerator) - 24usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::pTag"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, pTag) - 32usize]; + ["Offset of field: CK_GCM_MESSAGE_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_MESSAGE_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_MESSAGE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3471,81 +2125,21 @@ pub struct CK_GCM_PARAMS { pub ulAADLen: CK_ULONG, pub ulTagBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GCM_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GCM_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulIvBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulTagBits) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_GCM_PARAMS), - "::", - stringify!(ulTagBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GCM_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_GCM_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GCM_PARAMS::pIv"][::std::mem::offset_of!(CK_GCM_PARAMS, pIv) - 0usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvLen) - 8usize]; + ["Offset of field: CK_GCM_PARAMS::ulIvBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulIvBits) - 16usize]; + ["Offset of field: CK_GCM_PARAMS::pAAD"][::std::mem::offset_of!(CK_GCM_PARAMS, pAAD) - 24usize]; + ["Offset of field: CK_GCM_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulAADLen) - 32usize]; + ["Offset of field: CK_GCM_PARAMS::ulTagBits"] + [::std::mem::offset_of!(CK_GCM_PARAMS, ulTagBits) - 40usize]; +}; impl Default for CK_GCM_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3564,72 +2158,23 @@ pub struct CK_GOSTR3410_DERIVE_PARAMS { pub pUKM: *mut CK_BYTE, pub ulUKMLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_DERIVE_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pPublicData) - 8usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, pUKM) - 24usize]; + ["Offset of field: CK_GOSTR3410_DERIVE_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_DERIVE_PARAMS, ulUKMLen) - 32usize]; +}; impl Default for CK_GOSTR3410_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3648,72 +2193,23 @@ pub struct CK_GOSTR3410_KEY_WRAP_PARAMS { pub ulUKMLen: CK_ULONG, pub hKey: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_GOSTR3410_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pWrapOID) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pWrapOID) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWrapOIDLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulWrapOIDLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pUKM) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(pUKM) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulUKMLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(ulUKMLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_GOSTR3410_KEY_WRAP_PARAMS), - "::", - stringify!(hKey) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_GOSTR3410_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pWrapOID"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pWrapOID) - 0usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulWrapOIDLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulWrapOIDLen) - 8usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::pUKM"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, pUKM) - 16usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::ulUKMLen"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, ulUKMLen) - 24usize]; + ["Offset of field: CK_GOSTR3410_KEY_WRAP_PARAMS::hKey"] + [::std::mem::offset_of!(CK_GOSTR3410_KEY_WRAP_PARAMS, hKey) - 32usize]; +}; impl Default for CK_GOSTR3410_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3736,111 +2232,29 @@ pub struct CK_HKDF_PARAMS { pub pInfo: *mut CK_BYTE, pub ulInfoLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_HKDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_HKDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExtract) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExtract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bExpand) as usize - ptr as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(bExpand) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltType) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hSaltKey) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(hSaltKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(pInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulInfoLen) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_HKDF_PARAMS), - "::", - stringify!(ulInfoLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_HKDF_PARAMS"][::std::mem::size_of::() - 64usize]; + ["Alignment of CK_HKDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::bExtract"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExtract) - 0usize]; + ["Offset of field: CK_HKDF_PARAMS::bExpand"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, bExpand) - 1usize]; + ["Offset of field: CK_HKDF_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, prfHashMechanism) - 8usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltType"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltType) - 16usize]; + ["Offset of field: CK_HKDF_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_HKDF_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_HKDF_PARAMS::hSaltKey"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, hSaltKey) - 40usize]; + ["Offset of field: CK_HKDF_PARAMS::pInfo"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, pInfo) - 48usize]; + ["Offset of field: CK_HKDF_PARAMS::ulInfoLen"] + [::std::mem::offset_of!(CK_HKDF_PARAMS, ulInfoLen) - 56usize]; +}; impl Default for CK_HKDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3860,81 +2274,23 @@ pub struct CK_KEA_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_KEA_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEA_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isSender) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(isSender) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomA) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomB) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(RandomB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_KEA_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEA_DERIVE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_KEA_DERIVE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::isSender"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, isSender) - 0usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulRandomLen) - 8usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomA"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomA) - 16usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::RandomB"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, RandomB) - 24usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, ulPublicDataLen) - 32usize]; + ["Offset of field: CK_KEA_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_KEA_DERIVE_PARAMS, PublicData) - 40usize]; +}; impl Default for CK_KEA_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3950,42 +2306,17 @@ pub struct CK_KEY_DERIVATION_STRING_DATA { pub pData: *mut CK_BYTE, pub ulLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_DERIVATION_STRING_DATA() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_DERIVATION_STRING_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_DERIVATION_STRING_DATA), - "::", - stringify!(ulLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_KEY_DERIVATION_STRING_DATA"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::pData"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, pData) - 0usize]; + ["Offset of field: CK_KEY_DERIVATION_STRING_DATA::ulLen"] + [::std::mem::offset_of!(CK_KEY_DERIVATION_STRING_DATA, ulLen) - 8usize]; +}; impl Default for CK_KEY_DERIVATION_STRING_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4002,52 +2333,19 @@ pub struct CK_KEY_WRAP_SET_OAEP_PARAMS { pub pX: *mut CK_BYTE, pub ulXLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KEY_WRAP_SET_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bBC) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(bBC) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(pX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulXLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KEY_WRAP_SET_OAEP_PARAMS), - "::", - stringify!(ulXLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_KEY_WRAP_SET_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::bBC"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC) - 0usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::pX"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, pX) - 8usize]; + ["Offset of field: CK_KEY_WRAP_SET_OAEP_PARAMS::ulXLen"] + [::std::mem::offset_of!(CK_KEY_WRAP_SET_OAEP_PARAMS, ulXLen) - 16usize]; +}; impl Default for CK_KEY_WRAP_SET_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4065,61 +2363,18 @@ pub struct CK_KIP_PARAMS { pub pSeed: *mut CK_BYTE, pub ulSeedLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_KIP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_KIP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_KIP_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_KIP_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_KIP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pMechanism"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pMechanism) - 0usize]; + ["Offset of field: CK_KIP_PARAMS::hKey"][::std::mem::offset_of!(CK_KIP_PARAMS, hKey) - 8usize]; + ["Offset of field: CK_KIP_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_KIP_PARAMS, pSeed) - 16usize]; + ["Offset of field: CK_KIP_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_KIP_PARAMS, ulSeedLen) - 24usize]; +}; impl Default for CK_KIP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4136,51 +2391,16 @@ pub struct CK_OTP_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_OTP_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAM::type_"][::std::mem::offset_of!(CK_OTP_PARAM, type_) - 0usize]; + ["Offset of field: CK_OTP_PARAM::pValue"] + [::std::mem::offset_of!(CK_OTP_PARAM, pValue) - 8usize]; + ["Offset of field: CK_OTP_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_OTP_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_OTP_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4196,41 +2416,15 @@ pub struct CK_OTP_PARAMS { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_PARAMS), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_PARAMS::pParams"] + [::std::mem::offset_of!(CK_OTP_PARAMS, pParams) - 0usize]; + ["Offset of field: CK_OTP_PARAMS::ulCount"] + [::std::mem::offset_of!(CK_OTP_PARAMS, ulCount) - 8usize]; +}; impl Default for CK_OTP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4246,42 +2440,16 @@ pub struct CK_OTP_SIGNATURE_INFO { pub pParams: *mut CK_OTP_PARAM, pub ulCount: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pParams) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(pParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulCount) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_OTP_SIGNATURE_INFO), - "::", - stringify!(ulCount) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_OTP_SIGNATURE_INFO"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_OTP_SIGNATURE_INFO"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::pParams"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, pParams) - 0usize]; + ["Offset of field: CK_OTP_SIGNATURE_INFO::ulCount"] + [::std::mem::offset_of!(CK_OTP_SIGNATURE_INFO, ulCount) - 8usize]; +}; impl Default for CK_OTP_SIGNATURE_INFO { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4301,81 +2469,23 @@ pub struct CK_PBE_PARAMS { pub ulSaltLen: CK_ULONG, pub ulIteration: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PBE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PBE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitVector) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pInitVector) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSalt) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(pSalt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulSaltLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIteration) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PBE_PARAMS), - "::", - stringify!(ulIteration) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PBE_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_PBE_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PBE_PARAMS::pInitVector"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pInitVector) - 0usize]; + ["Offset of field: CK_PBE_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_PBE_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulPasswordLen) - 16usize]; + ["Offset of field: CK_PBE_PARAMS::pSalt"] + [::std::mem::offset_of!(CK_PBE_PARAMS, pSalt) - 24usize]; + ["Offset of field: CK_PBE_PARAMS::ulSaltLen"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulSaltLen) - 32usize]; + ["Offset of field: CK_PBE_PARAMS::ulIteration"] + [::std::mem::offset_of!(CK_PBE_PARAMS, ulIteration) - 40usize]; +}; impl Default for CK_PBE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4398,112 +2508,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4526,112 +2554,30 @@ pub struct CK_PKCS5_PBKD2_PARAMS2 { pub pPassword: *mut CK_UTF8CHAR, pub ulPasswordLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PKCS5_PBKD2_PARAMS2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PKCS5_PBKD2_PARAMS2)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).saltSource) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(saltSource) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSaltSourceData) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pSaltSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSaltSourceDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulSaltSourceDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iterations) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(iterations) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prf) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(prf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrfData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPrfData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrfDataLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPrfDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_PKCS5_PBKD2_PARAMS2), - "::", - stringify!(ulPasswordLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PKCS5_PBKD2_PARAMS2"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_PKCS5_PBKD2_PARAMS2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::saltSource"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, saltSource) - 0usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pSaltSourceData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pSaltSourceData) - 8usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulSaltSourceDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulSaltSourceDataLen) - 16usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::iterations"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, iterations) - 24usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::prf"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, prf) - 32usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPrfData"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPrfData) - 40usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPrfDataLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPrfDataLen) - 48usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::pPassword"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, pPassword) - 56usize]; + ["Offset of field: CK_PKCS5_PBKD2_PARAMS2::ulPasswordLen"] + [::std::mem::offset_of!(CK_PKCS5_PBKD2_PARAMS2, ulPasswordLen) - 64usize]; +}; impl Default for CK_PKCS5_PBKD2_PARAMS2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4648,51 +2594,17 @@ pub struct CK_PRF_DATA_PARAM { pub pValue: *mut ::std::os::raw::c_void, pub ulValueLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_PRF_DATA_PARAM() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_PRF_DATA_PARAM)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(pValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulValueLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_PRF_DATA_PARAM), - "::", - stringify!(ulValueLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_PRF_DATA_PARAM"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_PRF_DATA_PARAM"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::type_"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, type_) - 0usize]; + ["Offset of field: CK_PRF_DATA_PARAM::pValue"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, pValue) - 8usize]; + ["Offset of field: CK_PRF_DATA_PARAM::ulValueLen"] + [::std::mem::offset_of!(CK_PRF_DATA_PARAM, ulValueLen) - 16usize]; +}; impl Default for CK_PRF_DATA_PARAM { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4708,83 +2620,32 @@ pub struct CK_RC2_CBC_PARAMS { pub ulEffectiveBits: CK_ULONG, pub iv: [CK_BYTE; 8usize], } -#[test] -fn bindgen_test_layout_CK_RC2_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_CBC_PARAMS), - "::", - stringify!(iv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_CBC_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_CBC_PARAMS::iv"] + [::std::mem::offset_of!(CK_RC2_CBC_PARAMS, iv) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC2_MAC_GENERAL_PARAMS { pub ulEffectiveBits: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC2_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC2_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulEffectiveBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulEffectiveBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC2_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC2_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulEffectiveBits"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits) - 0usize]; + ["Offset of field: CK_RC2_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RC5_CBC_PARAMS { @@ -4793,61 +2654,19 @@ pub struct CK_RC5_CBC_PARAMS { pub pIv: *mut CK_BYTE, pub ulIvLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_CBC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_CBC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIv) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(pIv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIvLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_CBC_PARAMS), - "::", - stringify!(ulIvLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_CBC_PARAMS"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_RC5_CBC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::pIv"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, pIv) - 16usize]; + ["Offset of field: CK_RC5_CBC_PARAMS::ulIvLen"] + [::std::mem::offset_of!(CK_RC5_CBC_PARAMS, ulIvLen) - 24usize]; +}; impl Default for CK_RC5_CBC_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -4864,135 +2683,51 @@ pub struct CK_RC5_MAC_GENERAL_PARAMS { pub ulRounds: CK_ULONG, pub ulMacLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_MAC_GENERAL_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_MAC_GENERAL_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulRounds) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_MAC_GENERAL_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RC5_MAC_GENERAL_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulRounds) - 8usize]; + ["Offset of field: CK_RC5_MAC_GENERAL_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength) - 16usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_RC5_PARAMS { pub ulWordsize: CK_ULONG, pub ulRounds: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RC5_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RC5_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWordsize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulWordsize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRounds) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RC5_PARAMS), - "::", - stringify!(ulRounds) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RC5_PARAMS"][::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RC5_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RC5_PARAMS::ulWordsize"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulWordsize) - 0usize]; + ["Offset of field: CK_RC5_PARAMS::ulRounds"] + [::std::mem::offset_of!(CK_RC5_PARAMS, ulRounds) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_RSA_AES_KEY_WRAP_PARAMS { pub ulAESKeyBits: CK_ULONG, pub pOAEPParams: *mut CK_RSA_PKCS_OAEP_PARAMS, } -#[test] -fn bindgen_test_layout_CK_RSA_AES_KEY_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_AES_KEY_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAESKeyBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(ulAESKeyBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOAEPParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_AES_KEY_WRAP_PARAMS), - "::", - stringify!(pOAEPParams) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_RSA_AES_KEY_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::ulAESKeyBits"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, ulAESKeyBits) - 0usize]; + ["Offset of field: CK_RSA_AES_KEY_WRAP_PARAMS::pOAEPParams"] + [::std::mem::offset_of!(CK_RSA_AES_KEY_WRAP_PARAMS, pOAEPParams) - 8usize]; +}; impl Default for CK_RSA_AES_KEY_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5011,72 +2746,22 @@ pub struct CK_RSA_PKCS_OAEP_PARAMS { pub pSourceData: *mut ::std::os::raw::c_void, pub ulSourceDataLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_OAEP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_OAEP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSourceData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(pSourceData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSourceDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_OAEP_PARAMS), - "::", - stringify!(ulSourceDataLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_OAEP_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_RSA_PKCS_OAEP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::source"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, source) - 16usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::pSourceData"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, pSourceData) - 24usize]; + ["Offset of field: CK_RSA_PKCS_OAEP_PARAMS::ulSourceDataLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_OAEP_PARAMS, ulSourceDataLen) - 32usize]; +}; impl Default for CK_RSA_PKCS_OAEP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5093,52 +2778,18 @@ pub struct CK_RSA_PKCS_PSS_PARAMS { pub mgf: CK_RSA_PKCS_MGF_TYPE, pub sLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_RSA_PKCS_PSS_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_RSA_PKCS_PSS_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hashAlg) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(hashAlg) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mgf) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(mgf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_RSA_PKCS_PSS_PARAMS), - "::", - stringify!(sLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_RSA_PKCS_PSS_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_RSA_PKCS_PSS_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::hashAlg"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, hashAlg) - 0usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::mgf"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, mgf) - 8usize]; + ["Offset of field: CK_RSA_PKCS_PSS_PARAMS::sLen"] + [::std::mem::offset_of!(CK_RSA_PKCS_PSS_PARAMS, sLen) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { @@ -5146,58 +2797,19 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { pub ulNonceLen: CK_ULONG, pub pTag: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pTag) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS), - "::", - stringify!(pTag) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS::pTag"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS, pTag) - 16usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_MSG_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5215,65 +2827,21 @@ pub struct CK_SALSA20_CHACHA20_POLY1305_PARAMS { pub pAAD: *mut CK_BYTE, pub ulAADLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_CHACHA20_POLY1305_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulNonceLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAAD) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(pAAD) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAADLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_CHACHA20_POLY1305_PARAMS), - "::", - stringify!(ulAADLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SALSA20_CHACHA20_POLY1305_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pNonce) - 0usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulNonceLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulNonceLen) - 8usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::pAAD"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, pAAD) - 16usize]; + ["Offset of field: CK_SALSA20_CHACHA20_POLY1305_PARAMS::ulAADLen"] + [::std::mem::offset_of!(CK_SALSA20_CHACHA20_POLY1305_PARAMS, ulAADLen) - 24usize]; +}; impl Default for CK_SALSA20_CHACHA20_POLY1305_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5290,51 +2858,17 @@ pub struct CK_SALSA20_PARAMS { pub pNonce: *mut CK_BYTE, pub ulNonceBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SALSA20_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SALSA20_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBlockCounter) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pBlockCounter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNonce) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(pNonce) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNonceBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SALSA20_PARAMS), - "::", - stringify!(ulNonceBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SALSA20_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SALSA20_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::pBlockCounter"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pBlockCounter) - 0usize]; + ["Offset of field: CK_SALSA20_PARAMS::pNonce"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, pNonce) - 8usize]; + ["Offset of field: CK_SALSA20_PARAMS::ulNonceBits"] + [::std::mem::offset_of!(CK_SALSA20_PARAMS, ulNonceBits) - 16usize]; +}; impl Default for CK_SALSA20_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5351,52 +2885,19 @@ pub struct CK_SEED_CBC_ENCRYPT_DATA_PARAMS { pub pData: *mut CK_BYTE, pub length: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SEED_CBC_ENCRYPT_DATA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).iv) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(iv) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pData) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(pData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS), - "::", - stringify!(length) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SEED_CBC_ENCRYPT_DATA_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::iv"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, iv) - 0usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::pData"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, pData) - 16usize]; + ["Offset of field: CK_SEED_CBC_ENCRYPT_DATA_PARAMS::length"] + [::std::mem::offset_of!(CK_SEED_CBC_ENCRYPT_DATA_PARAMS, length) - 24usize]; +}; impl Default for CK_SEED_CBC_ENCRYPT_DATA_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5421,132 +2922,35 @@ pub struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS { pub pBaseG: *mut CK_BYTE, pub pSubprimeQ: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_PRIVATE_WRAP_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPasswordLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPassword) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPAndGLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulPAndGLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulQLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulQLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(ulRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrimeP) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pPrimeP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pBaseG) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pBaseG) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSubprimeQ) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS), - "::", - stringify!(pSubprimeQ) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of CK_SKIPJACK_PRIVATE_WRAP_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPasswordLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword) - 8usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPublicDataLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData) - 24usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulPAndGLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulQLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen) - 40usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::ulRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pPrimeP"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP) - 64usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pBaseG"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG) - 72usize]; + ["Offset of field: CK_SKIPJACK_PRIVATE_WRAP_PARAMS::pSubprimeQ"] + [::std::mem::offset_of!(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ) - 80usize]; +}; impl Default for CK_SKIPJACK_PRIVATE_WRAP_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5574,162 +2978,41 @@ pub struct CK_SKIPJACK_RELAYX_PARAMS { pub ulNewRandomLen: CK_ULONG, pub pNewRandomA: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SKIPJACK_RELAYX_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SKIPJACK_RELAYX_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldWrappedXLen) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldWrappedXLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldWrappedX) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldWrappedX) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPasswordLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPassword) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldPublicDataLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldPublicData) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOldRandomLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulOldRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOldRandomA) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pOldRandomA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPasswordLen) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPasswordLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPassword) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPassword) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewPublicDataLen) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewPublicData) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNewRandomLen) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(ulNewRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pNewRandomA) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_SKIPJACK_RELAYX_PARAMS), - "::", - stringify!(pNewRandomA) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::size_of::() - 112usize]; + ["Alignment of CK_SKIPJACK_RELAYX_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldWrappedXLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldWrappedXLen) - 0usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldWrappedX"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX) - 8usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPasswordLen) - 16usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword) - 24usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldPublicDataLen) - 32usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData) - 40usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulOldRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen) - 48usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pOldRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA) - 56usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPasswordLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPasswordLen) - 64usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPassword"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword) - 72usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewPublicDataLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewPublicDataLen) - 80usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewPublicData"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData) - 88usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::ulNewRandomLen"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen) - 96usize]; + ["Offset of field: CK_SKIPJACK_RELAYX_PARAMS::pNewRandomA"] + [::std::mem::offset_of!(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA) - 104usize]; +}; impl Default for CK_SKIPJACK_RELAYX_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5745,42 +3028,17 @@ pub struct CK_SP800_108_COUNTER_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_COUNTER_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_COUNTER_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_COUNTER_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CK_SP800_108_COUNTER_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, bLittleEndian) - 0usize]; + ["Offset of field: CK_SP800_108_COUNTER_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_COUNTER_FORMAT, ulWidthInBits) - 8usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_SP800_108_DKM_LENGTH_FORMAT { @@ -5788,52 +3046,19 @@ pub struct CK_SP800_108_DKM_LENGTH_FORMAT { pub bLittleEndian: CK_BBOOL, pub ulWidthInBits: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SP800_108_DKM_LENGTH_FORMAT() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_DKM_LENGTH_FORMAT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dkmLengthMethod) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(dkmLengthMethod) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bLittleEndian) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(bLittleEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulWidthInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_DKM_LENGTH_FORMAT), - "::", - stringify!(ulWidthInBits) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of CK_SP800_108_DKM_LENGTH_FORMAT"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::dkmLengthMethod"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, dkmLengthMethod) - 0usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::bLittleEndian"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, bLittleEndian) - 8usize]; + ["Offset of field: CK_SP800_108_DKM_LENGTH_FORMAT::ulWidthInBits"] + [::std::mem::offset_of!(CK_SP800_108_DKM_LENGTH_FORMAT, ulWidthInBits) - 16usize]; +}; pub type CK_SP800_108_PRF_TYPE = CK_MECHANISM_TYPE; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5846,95 +3071,31 @@ pub struct CK_SP800_108_FEEDBACK_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_FEEDBACK_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulIVLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pIV) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_FEEDBACK_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of CK_SP800_108_FEEDBACK_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulIVLen"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, ulIVLen) - 24usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pIV"] + [::std::mem::offset_of!(CK_SP800_108_FEEDBACK_KDF_PARAMS, pIV) - 32usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::ulAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + ulAdditionalDerivedKeys + ) - 40usize]; + ["Offset of field: CK_SP800_108_FEEDBACK_KDF_PARAMS::pAdditionalDerivedKeys"][::std::mem::offset_of!( + CK_SP800_108_FEEDBACK_KDF_PARAMS, + pAdditionalDerivedKeys + ) - 48usize]; +}; impl Default for CK_SP800_108_FEEDBACK_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -5953,72 +3114,22 @@ pub struct CK_SP800_108_KDF_PARAMS { pub ulAdditionalDerivedKeys: CK_ULONG, pub pAdditionalDerivedKeys: *mut CK_DERIVED_KEY, } -#[test] -fn bindgen_test_layout_CK_SP800_108_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SP800_108_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfType) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(prfType) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulNumberOfDataParams) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulNumberOfDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pDataParams) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pDataParams) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulAdditionalDerivedKeys) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(ulAdditionalDerivedKeys) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pAdditionalDerivedKeys) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SP800_108_KDF_PARAMS), - "::", - stringify!(pAdditionalDerivedKeys) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SP800_108_KDF_PARAMS"][::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SP800_108_KDF_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::prfType"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, prfType) - 0usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulNumberOfDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulNumberOfDataParams) - 8usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pDataParams"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pDataParams) - 16usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::ulAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, ulAdditionalDerivedKeys) - 24usize]; + ["Offset of field: CK_SP800_108_KDF_PARAMS::pAdditionalDerivedKeys"] + [::std::mem::offset_of!(CK_SP800_108_KDF_PARAMS, pAdditionalDerivedKeys) - 32usize]; +}; impl Default for CK_SP800_108_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6040,102 +3151,29 @@ pub struct CK_X2RATCHET_INITIALIZE_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_INITIALIZE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_INITIALIZE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).peer_public_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(peer_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_INITIALIZE_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_INITIALIZE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::peer_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, peer_public_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_INITIALIZE_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_INITIALIZE_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_INITIALIZE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6157,102 +3195,29 @@ pub struct CK_X2RATCHET_RESPOND_PARAMS { pub aeadMechanism: CK_MECHANISM_TYPE, pub kdfMechanism: CK_X2RATCHET_KDF_TYPE, } -#[test] -fn bindgen_test_layout_CK_X2RATCHET_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X2RATCHET_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(sk) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_prekey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).initiator_identity) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(initiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).own_public_identity) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(own_public_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bEncryptedHeader) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(bEncryptedHeader) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).eCurve) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(eCurve) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).aeadMechanism) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(aeadMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdfMechanism) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X2RATCHET_RESPOND_PARAMS), - "::", - stringify!(kdfMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of CK_X2RATCHET_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::sk"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, sk) - 0usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_prekey"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_prekey) - 8usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::initiator_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, initiator_identity) - 16usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::own_public_identity"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, own_public_identity) - 24usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::bEncryptedHeader"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, bEncryptedHeader) - 32usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::eCurve"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, eCurve) - 40usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::aeadMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, aeadMechanism) - 48usize]; + ["Offset of field: CK_X2RATCHET_RESPOND_PARAMS::kdfMechanism"] + [::std::mem::offset_of!(CK_X2RATCHET_RESPOND_PARAMS, kdfMechanism) - 56usize]; +}; impl Default for CK_X2RATCHET_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6273,92 +3238,26 @@ pub struct CK_X3DH_INITIATE_PARAMS { pub pOwn_identity: CK_OBJECT_HANDLE, pub pOwn_ephemeral: CK_OBJECT_HANDLE, } -#[test] -fn bindgen_test_layout_CK_X3DH_INITIATE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_INITIATE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_identity) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPeer_prekey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPeer_prekey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_signature) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pPrekey_signature) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_key) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOnetime_key) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_identity) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOwn_ephemeral) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_INITIATE_PARAMS), - "::", - stringify!(pOwn_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_INITIATE_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_X3DH_INITIATE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_identity) - 8usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPeer_prekey"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPeer_prekey) - 16usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pPrekey_signature"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pPrekey_signature) - 24usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOnetime_key"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOnetime_key) - 32usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_identity"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_identity) - 40usize]; + ["Offset of field: CK_X3DH_INITIATE_PARAMS::pOwn_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_INITIATE_PARAMS, pOwn_ephemeral) - 48usize]; +}; impl Default for CK_X3DH_INITIATE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6378,82 +3277,24 @@ pub struct CK_X3DH_RESPOND_PARAMS { pub pInitiator_identity: CK_OBJECT_HANDLE, pub pInitiator_ephemeral: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X3DH_RESPOND_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X3DH_RESPOND_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIdentity_id) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pIdentity_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPrekey_id) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pPrekey_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOnetime_id) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pOnetime_id) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_identity) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_identity) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pInitiator_ephemeral) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X3DH_RESPOND_PARAMS), - "::", - stringify!(pInitiator_ephemeral) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X3DH_RESPOND_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_X3DH_RESPOND_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pIdentity_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pIdentity_id) - 8usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pPrekey_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pPrekey_id) - 16usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pOnetime_id"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pOnetime_id) - 24usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_identity"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_identity) - 32usize]; + ["Offset of field: CK_X3DH_RESPOND_PARAMS::pInitiator_ephemeral"] + [::std::mem::offset_of!(CK_X3DH_RESPOND_PARAMS, pInitiator_ephemeral) - 40usize]; +}; impl Default for CK_X3DH_RESPOND_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6472,72 +3313,23 @@ pub struct CK_X9_42_DH1_DERIVE_PARAMS { pub ulPublicDataLen: CK_ULONG, pub pPublicData: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH1_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH1_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH1_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_X9_42_DH1_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH1_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData) - 32usize]; +}; impl Default for CK_X9_42_DH1_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6560,112 +3352,31 @@ pub struct CK_X9_42_DH2_DERIVE_PARAMS { pub ulPublicDataLen2: CK_ULONG, pub pPublicData2: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_X9_42_DH2_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_DH2_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pOtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pPublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_DH2_DERIVE_PARAMS), - "::", - stringify!(pPublicData2) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of CK_X9_42_DH2_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pOtherInfo"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData) - 32usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_DH2_DERIVE_PARAMS::pPublicData2"] + [::std::mem::offset_of!(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2) - 64usize]; +}; impl Default for CK_X9_42_DH2_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6683,128 +3394,39 @@ pub struct CK_X9_42_MQV_DERIVE_PARAMS { pub OtherInfo: *mut CK_BYTE, pub ulPublicDataLen: CK_ULONG, pub PublicData: *mut CK_BYTE, - pub ulPrivateDataLen: CK_ULONG, - pub hPrivateData: CK_OBJECT_HANDLE, - pub ulPublicDataLen2: CK_ULONG, - pub PublicData2: *mut CK_BYTE, - pub publicKey: CK_OBJECT_HANDLE, -} -#[test] -fn bindgen_test_layout_CK_X9_42_MQV_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_X9_42_MQV_DERIVE_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).kdf) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(kdf) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulOtherInfoLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulOtherInfoLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).OtherInfo) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(OtherInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPrivateDataLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPrivateDataLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hPrivateData) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(hPrivateData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulPublicDataLen2) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(ulPublicDataLen2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).PublicData2) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(PublicData2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).publicKey) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_X9_42_MQV_DERIVE_PARAMS), - "::", - stringify!(publicKey) - ) - ); + pub ulPrivateDataLen: CK_ULONG, + pub hPrivateData: CK_OBJECT_HANDLE, + pub ulPublicDataLen2: CK_ULONG, + pub PublicData2: *mut CK_BYTE, + pub publicKey: CK_OBJECT_HANDLE, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of CK_X9_42_MQV_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::kdf"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, kdf) - 0usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulOtherInfoLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulOtherInfoLen) - 8usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::OtherInfo"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, OtherInfo) - 16usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen) - 24usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData) - 32usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPrivateDataLen"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen) - 40usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::hPrivateData"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData) - 48usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::ulPublicDataLen2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2) - 56usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::PublicData2"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, PublicData2) - 64usize]; + ["Offset of field: CK_X9_42_MQV_DERIVE_PARAMS::publicKey"] + [::std::mem::offset_of!(CK_X9_42_MQV_DERIVE_PARAMS, publicKey) - 72usize]; +}; impl Default for CK_X9_42_MQV_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6819,31 +3441,41 @@ impl Default for CK_X9_42_MQV_DERIVE_PARAMS { pub struct CK_XEDDSA_PARAMS { pub hash: CK_XEDDSA_HASH_TYPE, } -#[test] -fn bindgen_test_layout_CK_XEDDSA_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_XEDDSA_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_XEDDSA_PARAMS), - "::", - stringify!(hash) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_XEDDSA_PARAMS"][::std::mem::size_of::() - 8usize]; + ["Alignment of CK_XEDDSA_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_XEDDSA_PARAMS::hash"] + [::std::mem::offset_of!(CK_XEDDSA_PARAMS, hash) - 0usize]; +}; +pub type CK_SSL3_KEY_MAT_OUT_PTR = *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_OUT; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR = *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_SSL3_KEY_MAT_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_SSL3_MASTER_KEY_DERIVE_PARAMS; +pub type CK_SSL3_RANDOM_DATA_PTR = *mut CK_SSL3_RANDOM_DATA; +pub type CK_SSL3_RANDOM_DATA_PTR_PTR = *mut *mut CK_SSL3_RANDOM_DATA; +pub type CK_TLS_KDF_PARAMS_PTR = *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_KDF_PARAMS_PTR_PTR = *mut *mut CK_TLS_KDF_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR = *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_MAC_PARAMS_PTR_PTR = *mut *mut CK_TLS_MAC_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR = *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_TLS_PRF_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR = *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_TLS12_KEY_MAT_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_TLS12_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_KEY_MAT_OUT_PTR = *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_OUT_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_OUT; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR = *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_KEY_MAT_PARAMS_PTR_PTR = *mut *mut CK_WTLS_KEY_MAT_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR = *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR_PTR = *mut *mut CK_WTLS_MASTER_KEY_DERIVE_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR = *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_PRF_PARAMS_PTR_PTR = *mut *mut CK_WTLS_PRF_PARAMS; +pub type CK_WTLS_RANDOM_DATA_PTR = *mut CK_WTLS_RANDOM_DATA; +pub type CK_WTLS_RANDOM_DATA_PTR_PTR = *mut *mut CK_WTLS_RANDOM_DATA; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_SSL3_KEY_MAT_OUT { @@ -6854,81 +3486,23 @@ pub struct CK_SSL3_KEY_MAT_OUT { pub pIVClient: *mut CK_BYTE, pub pIVServer: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerMacSecret) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hClientKey) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hClientKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hServerKey) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(hServerKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVClient) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVClient) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIVServer) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_OUT), - "::", - stringify!(pIVServer) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_OUT"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_SSL3_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientMacSecret) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerMacSecret"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerMacSecret) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hClientKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hClientKey) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::hServerKey"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, hServerKey) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVClient"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVClient) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_OUT::pIVServer"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_OUT, pIVServer) - 40usize]; +}; impl Default for CK_SSL3_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6946,61 +3520,19 @@ pub struct CK_SSL3_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_SSL3_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_SSL3_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_SSL3_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_SSL3_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_SSL3_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7020,82 +3552,24 @@ pub struct CK_SSL3_KEY_MAT_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_SSL3_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_SSL3_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_KEY_MAT_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_SSL3_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_SSL3_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; +}; impl Default for CK_SSL3_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7111,45 +3585,17 @@ pub struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_SSL3_RANDOM_DATA, pub pVersion: *mut CK_VERSION, } -#[test] -fn bindgen_test_layout_CK_SSL3_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of CK_SSL3_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_SSL3_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; +}; impl Default for CK_SSL3_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7169,81 +3615,23 @@ pub struct CK_TLS_KDF_PARAMS { pub pContextData: *mut CK_BYTE, pub ulContextDataLength: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_KDF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_KDF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(prfMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulLabelLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pContextData) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(pContextData) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulContextDataLength) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_KDF_PARAMS), - "::", - stringify!(ulContextDataLength) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_KDF_PARAMS"][::std::mem::size_of::() - 72usize]; + ["Alignment of CK_TLS_KDF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::prfMechanism"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, prfMechanism) - 0usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pLabel) - 8usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulLabelLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulLabelLength) - 16usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, RandomInfo) - 24usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::pContextData"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, pContextData) - 56usize]; + ["Offset of field: CK_TLS_KDF_PARAMS::ulContextDataLength"] + [::std::mem::offset_of!(CK_TLS_KDF_PARAMS, ulContextDataLength) - 64usize]; +}; impl Default for CK_TLS_KDF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7260,51 +3648,17 @@ pub struct CK_TLS_MAC_PARAMS { pub ulMacLength: CK_ULONG, pub ulServerOrClient: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_MAC_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_MAC_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacLength) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulMacLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerOrClient) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_MAC_PARAMS), - "::", - stringify!(ulServerOrClient) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_MAC_PARAMS"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_TLS_MAC_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, prfHashMechanism) - 0usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulMacLength"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulMacLength) - 8usize]; + ["Offset of field: CK_TLS_MAC_PARAMS::ulServerOrClient"] + [::std::mem::offset_of!(CK_TLS_MAC_PARAMS, ulServerOrClient) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CK_TLS_PRF_PARAMS { @@ -7315,81 +3669,23 @@ pub struct CK_TLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_TLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS_PRF_PARAMS"][::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pSeed) - 0usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulSeedLen) - 8usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pLabel) - 16usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, ulLabelLen) - 24usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pOutput) - 32usize]; + ["Offset of field: CK_TLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_TLS_PRF_PARAMS, pulOutputLen) - 40usize]; +}; impl Default for CK_TLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7410,92 +3706,26 @@ pub struct CK_TLS12_KEY_MAT_PARAMS { pub pReturnedKeyMaterial: *mut CK_SSL3_KEY_MAT_OUT, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_TLS12_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_KEY_MAT_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_KEY_MAT_PARAMS"][::std::mem::size_of::() - 80usize]; + ["Alignment of CK_TLS12_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulMacSizeInBits) - 0usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulKeySizeInBits) - 8usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, ulIVSizeInBits) - 16usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, bIsExport) - 24usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, RandomInfo) - 32usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 64usize]; + ["Offset of field: CK_TLS12_KEY_MAT_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_KEY_MAT_PARAMS, prfHashMechanism) - 72usize]; +}; impl Default for CK_TLS12_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7512,55 +3742,19 @@ pub struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS { pub pVersion: *mut CK_VERSION, pub prfHashMechanism: CK_MECHANISM_TYPE, } -#[test] -fn bindgen_test_layout_CK_TLS12_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).prfHashMechanism) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(prfHashMechanism) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_TLS12_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 0usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, pVersion) - 32usize]; + ["Offset of field: CK_TLS12_MASTER_KEY_DERIVE_PARAMS::prfHashMechanism"] + [::std::mem::offset_of!(CK_TLS12_MASTER_KEY_DERIVE_PARAMS, prfHashMechanism) - 40usize]; +}; impl Default for CK_TLS12_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7577,51 +3771,17 @@ pub struct CK_WTLS_KEY_MAT_OUT { pub hKey: CK_OBJECT_HANDLE, pub pIV: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_OUT() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_OUT)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hMacSecret) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hMacSecret) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hKey) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(hKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pIV) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_OUT), - "::", - stringify!(pIV) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_OUT"][::std::mem::size_of::() - 24usize]; + ["Alignment of CK_WTLS_KEY_MAT_OUT"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hMacSecret"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hMacSecret) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::hKey"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, hKey) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_OUT::pIV"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_OUT, pIV) - 16usize]; +}; impl Default for CK_WTLS_KEY_MAT_OUT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7639,61 +3799,19 @@ pub struct CK_WTLS_RANDOM_DATA { pub pServerRandom: *mut CK_BYTE, pub ulServerRandomLen: CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_RANDOM_DATA() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_RANDOM_DATA)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pClientRandom) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pClientRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulClientRandomLen) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulClientRandomLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pServerRandom) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(pServerRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulServerRandomLen) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_RANDOM_DATA), - "::", - stringify!(ulServerRandomLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_RANDOM_DATA"][::std::mem::size_of::() - 32usize]; + ["Alignment of CK_WTLS_RANDOM_DATA"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pClientRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pClientRandom) - 0usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulClientRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulClientRandomLen) - 8usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::pServerRandom"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, pServerRandom) - 16usize]; + ["Offset of field: CK_WTLS_RANDOM_DATA::ulServerRandomLen"] + [::std::mem::offset_of!(CK_WTLS_RANDOM_DATA, ulServerRandomLen) - 24usize]; +}; impl Default for CK_WTLS_RANDOM_DATA { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7715,102 +3833,28 @@ pub struct CK_WTLS_KEY_MAT_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pReturnedKeyMaterial: *mut CK_WTLS_KEY_MAT_OUT, } -#[test] -fn bindgen_test_layout_CK_WTLS_KEY_MAT_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_KEY_MAT_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulMacSizeInBits) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulMacSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulKeySizeInBits) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulKeySizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulIVSizeInBits) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulIVSizeInBits) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSequenceNumber) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(ulSequenceNumber) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).bIsExport) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(bIsExport) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pReturnedKeyMaterial) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_KEY_MAT_PARAMS), - "::", - stringify!(pReturnedKeyMaterial) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_KEY_MAT_PARAMS"][::std::mem::size_of::() - 88usize]; + ["Alignment of CK_WTLS_KEY_MAT_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulMacSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits) - 8usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulKeySizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits) - 16usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulIVSizeInBits"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits) - 24usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::ulSequenceNumber"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber) - 32usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::bIsExport"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, bIsExport) - 40usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, RandomInfo) - 48usize]; + ["Offset of field: CK_WTLS_KEY_MAT_PARAMS::pReturnedKeyMaterial"] + [::std::mem::offset_of!(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial) - 80usize]; +}; impl Default for CK_WTLS_KEY_MAT_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7827,55 +3871,19 @@ pub struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS { pub RandomInfo: CK_WTLS_RANDOM_DATA, pub pVersion: *mut CK_BYTE, } -#[test] -fn bindgen_test_layout_CK_WTLS_MASTER_KEY_DERIVE_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).RandomInfo) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(RandomInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pVersion) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS), - "::", - stringify!(pVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of CK_WTLS_MASTER_KEY_DERIVE_PARAMS"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::RandomInfo"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo) - 8usize]; + ["Offset of field: CK_WTLS_MASTER_KEY_DERIVE_PARAMS::pVersion"] + [::std::mem::offset_of!(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion) - 40usize]; +}; impl Default for CK_WTLS_MASTER_KEY_DERIVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -7896,91 +3904,25 @@ pub struct CK_WTLS_PRF_PARAMS { pub pOutput: *mut CK_BYTE, pub pulOutputLen: *mut CK_ULONG, } -#[test] -fn bindgen_test_layout_CK_WTLS_PRF_PARAMS() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_WTLS_PRF_PARAMS)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).DigestMechanism) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(DigestMechanism) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pSeed) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pSeed) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulSeedLen) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulSeedLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pLabel) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pLabel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ulLabelLen) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(ulLabelLen) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pOutput) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pOutput) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pulOutputLen) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_WTLS_PRF_PARAMS), - "::", - stringify!(pulOutputLen) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_WTLS_PRF_PARAMS"][::std::mem::size_of::() - 56usize]; + ["Alignment of CK_WTLS_PRF_PARAMS"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::DigestMechanism"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, DigestMechanism) - 0usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pSeed"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pSeed) - 8usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulSeedLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulSeedLen) - 16usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pLabel"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pLabel) - 24usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::ulLabelLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, ulLabelLen) - 32usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pOutput"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pOutput) - 40usize]; + ["Offset of field: CK_WTLS_PRF_PARAMS::pulOutputLen"] + [::std::mem::offset_of!(CK_WTLS_PRF_PARAMS, pulOutputLen) - 48usize]; +}; impl Default for CK_WTLS_PRF_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -8674,951 +4616,197 @@ pub struct CK_FUNCTION_LIST_3_0 { pub C_VerifyMessageNext: CK_C_VerifyMessageNext, pub C_MessageVerifyFinal: CK_C_MessageVerifyFinal, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST_3_0() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 744usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST_3_0)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterfaceList) as usize - ptr as usize }, - 552usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterfaceList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInterface) as usize - ptr as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_GetInterface) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_LoginUser) as usize - ptr as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_LoginUser) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SessionCancel) as usize - ptr as usize }, - 576usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SessionCancel) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptInit) as usize - ptr as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessage) as usize - ptr as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageBegin) as usize - ptr as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptMessageNext) as usize - ptr as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_EncryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageEncryptFinal) as usize - ptr as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageEncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptInit) as usize - ptr as usize }, - 624usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessage) as usize - ptr as usize }, - 632usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageBegin) as usize - ptr as usize }, - 640usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptMessageNext) as usize - ptr as usize }, - 648usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_DecryptMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageDecryptFinal) as usize - ptr as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageDecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignInit) as usize - ptr as usize }, - 664usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessage) as usize - ptr as usize }, - 672usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageBegin) as usize - ptr as usize }, - 680usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignMessageNext) as usize - ptr as usize }, - 688usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_SignMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageSignFinal) as usize - ptr as usize }, - 696usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageSignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyInit) as usize - ptr as usize }, - 704usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessage) as usize - ptr as usize }, - 712usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessage) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageBegin) as usize - ptr as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageBegin) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyMessageNext) as usize - ptr as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_VerifyMessageNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_MessageVerifyFinal) as usize - ptr as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST_3_0), - "::", - stringify!(C_MessageVerifyFinal) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST_3_0"][::std::mem::size_of::() - 744usize]; + ["Alignment of CK_FUNCTION_LIST_3_0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_WaitForSlotEvent) - 544usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterfaceList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterfaceList) - 552usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_GetInterface"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_GetInterface) - 560usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_LoginUser"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_LoginUser) - 568usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SessionCancel"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SessionCancel) - 576usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptInit) - 584usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessage) - 592usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageBegin) - 600usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_EncryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_EncryptMessageNext) - 608usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageEncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageEncryptFinal) - 616usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptInit) - 624usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessage) - 632usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageBegin) - 640usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_DecryptMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_DecryptMessageNext) - 648usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageDecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageDecryptFinal) - 656usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignInit) - 664usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessage) - 672usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageBegin) - 680usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_SignMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_SignMessageNext) - 688usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageSignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageSignFinal) - 696usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyInit) - 704usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessage"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessage) - 712usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageBegin"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageBegin) - 720usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_VerifyMessageNext"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_VerifyMessageNext) - 728usize]; + ["Offset of field: CK_FUNCTION_LIST_3_0::C_MessageVerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST_3_0, C_MessageVerifyFinal) - 736usize]; +}; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CK_FUNCTION_LIST { @@ -9692,712 +4880,149 @@ pub struct CK_FUNCTION_LIST { pub C_CancelFunction: CK_C_CancelFunction, pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent, } -#[test] -fn bindgen_test_layout_CK_FUNCTION_LIST() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 552usize, - concat!("Size of: ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CK_FUNCTION_LIST)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Initialize) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Initialize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Finalize) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Finalize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetInfo) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionList) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotList) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSlotInfo) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSlotInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetTokenInfo) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetTokenInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismList) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismList) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetMechanismInfo) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetMechanismInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitToken) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitToken) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_InitPIN) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_InitPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetPIN) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetPIN) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_OpenSession) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_OpenSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseSession) as usize - ptr as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseSession) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CloseAllSessions) as usize - ptr as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CloseAllSessions) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetSessionInfo) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetSessionInfo) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetOperationState) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetOperationState) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetOperationState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Login) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Login) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Logout) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Logout) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CreateObject) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CreateObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CopyObject) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CopyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DestroyObject) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DestroyObject) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetObjectSize) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetObjectSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetAttributeValue) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SetAttributeValue) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SetAttributeValue) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsInit) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjects) as usize - ptr as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjects) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_FindObjectsFinal) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_FindObjectsFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptInit) as usize - ptr as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Encrypt) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Encrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptUpdate) as usize - ptr as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_EncryptFinal) as usize - ptr as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_EncryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptInit) as usize - ptr as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Decrypt) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Decrypt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptUpdate) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptFinal) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestInit) as usize - ptr as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Digest) as usize - ptr as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Digest) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestUpdate) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestKey) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestFinal) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignInit) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Sign) as usize - ptr as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Sign) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignUpdate) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignFinal) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecoverInit) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignRecover) as usize - ptr as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyInit) as usize - ptr as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_Verify) as usize - ptr as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_Verify) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyUpdate) as usize - ptr as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyFinal) as usize - ptr as usize }, - 416usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyFinal) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecoverInit) as usize - ptr as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecoverInit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_VerifyRecover) as usize - ptr as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_VerifyRecover) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DigestEncryptUpdate) as usize - ptr as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DigestEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptDigestUpdate) as usize - ptr as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptDigestUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SignEncryptUpdate) as usize - ptr as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SignEncryptUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DecryptVerifyUpdate) as usize - ptr as usize }, - 464usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DecryptVerifyUpdate) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKey) as usize - ptr as usize }, - 472usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateKeyPair) as usize - ptr as usize }, - 480usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateKeyPair) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WrapKey) as usize - ptr as usize }, - 488usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_UnwrapKey) as usize - ptr as usize }, - 496usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_UnwrapKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_DeriveKey) as usize - ptr as usize }, - 504usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_DeriveKey) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_SeedRandom) as usize - ptr as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_SeedRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GenerateRandom) as usize - ptr as usize }, - 520usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GenerateRandom) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_GetFunctionStatus) as usize - ptr as usize }, - 528usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_GetFunctionStatus) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_CancelFunction) as usize - ptr as usize }, - 536usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_CancelFunction) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).C_WaitForSlotEvent) as usize - ptr as usize }, - 544usize, - concat!( - "Offset of field: ", - stringify!(CK_FUNCTION_LIST), - "::", - stringify!(C_WaitForSlotEvent) - ) - ); -} -extern crate libloading; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CK_FUNCTION_LIST"][::std::mem::size_of::() - 552usize]; + ["Alignment of CK_FUNCTION_LIST"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::version"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, version) - 0usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Initialize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Initialize) - 8usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Finalize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Finalize) - 16usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetInfo) - 24usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionList) - 32usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotList) - 40usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSlotInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSlotInfo) - 48usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetTokenInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetTokenInfo) - 56usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismList"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismList) - 64usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetMechanismInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetMechanismInfo) - 72usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitToken"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitToken) - 80usize]; + ["Offset of field: CK_FUNCTION_LIST::C_InitPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_InitPIN) - 88usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetPIN"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetPIN) - 96usize]; + ["Offset of field: CK_FUNCTION_LIST::C_OpenSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_OpenSession) - 104usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseSession"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseSession) - 112usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CloseAllSessions"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CloseAllSessions) - 120usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetSessionInfo"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetSessionInfo) - 128usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetOperationState) - 136usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetOperationState"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetOperationState) - 144usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Login"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Login) - 152usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Logout"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Logout) - 160usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CreateObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CreateObject) - 168usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CopyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CopyObject) - 176usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DestroyObject"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DestroyObject) - 184usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetObjectSize"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetObjectSize) - 192usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetAttributeValue) - 200usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SetAttributeValue"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SetAttributeValue) - 208usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsInit) - 216usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjects"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjects) - 224usize]; + ["Offset of field: CK_FUNCTION_LIST::C_FindObjectsFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_FindObjectsFinal) - 232usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptInit) - 240usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Encrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Encrypt) - 248usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptUpdate) - 256usize]; + ["Offset of field: CK_FUNCTION_LIST::C_EncryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_EncryptFinal) - 264usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptInit) - 272usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Decrypt"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Decrypt) - 280usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptUpdate) - 288usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptFinal) - 296usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestInit) - 304usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Digest"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Digest) - 312usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestUpdate) - 320usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestKey) - 328usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestFinal) - 336usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignInit) - 344usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Sign"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Sign) - 352usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignUpdate) - 360usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignFinal) - 368usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecoverInit) - 376usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignRecover) - 384usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyInit) - 392usize]; + ["Offset of field: CK_FUNCTION_LIST::C_Verify"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_Verify) - 400usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyUpdate) - 408usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyFinal"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyFinal) - 416usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecoverInit"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecoverInit) - 424usize]; + ["Offset of field: CK_FUNCTION_LIST::C_VerifyRecover"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_VerifyRecover) - 432usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DigestEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DigestEncryptUpdate) - 440usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptDigestUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptDigestUpdate) - 448usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SignEncryptUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SignEncryptUpdate) - 456usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DecryptVerifyUpdate"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DecryptVerifyUpdate) - 464usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKey) - 472usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateKeyPair"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateKeyPair) - 480usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WrapKey) - 488usize]; + ["Offset of field: CK_FUNCTION_LIST::C_UnwrapKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_UnwrapKey) - 496usize]; + ["Offset of field: CK_FUNCTION_LIST::C_DeriveKey"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_DeriveKey) - 504usize]; + ["Offset of field: CK_FUNCTION_LIST::C_SeedRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_SeedRandom) - 512usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GenerateRandom"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GenerateRandom) - 520usize]; + ["Offset of field: CK_FUNCTION_LIST::C_GetFunctionStatus"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_GetFunctionStatus) - 528usize]; + ["Offset of field: CK_FUNCTION_LIST::C_CancelFunction"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_CancelFunction) - 536usize]; + ["Offset of field: CK_FUNCTION_LIST::C_WaitForSlotEvent"] + [::std::mem::offset_of!(CK_FUNCTION_LIST, C_WaitForSlotEvent) - 544usize]; +}; pub struct Pkcs11 { __library: ::libloading::Library, pub C_Initialize: Result< From c8b0b53944971328916cf39853c98f313a2243ac Mon Sep 17 00:00:00 2001 From: Joe Rozner Date: Wed, 5 Feb 2025 14:18:00 -0800 Subject: [PATCH 3/3] Add link to issue Signed-off-by: Joe Rozner --- cryptoki-sys/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptoki-sys/build.rs b/cryptoki-sys/build.rs index 533a433c..49148552 100644 --- a/cryptoki-sys/build.rs +++ b/cryptoki-sys/build.rs @@ -105,6 +105,7 @@ mod generate { .derive_default(true) .parse_callbacks(Box::new(CargoCallbacks)) // Support function like macros + // https://github.com/parallaxsecond/rust-cryptoki/issues/240 .clang_macro_fallback(); let bindings = builder.generate().expect("Unable to generate bindings");