Function esp_idf_svc::sys::mbedtls_pk_setup_rsa_alt
source · pub unsafe extern "C" fn mbedtls_pk_setup_rsa_alt(
ctx: *mut mbedtls_pk_context,
key: *mut c_void,
decrypt_func: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut usize, _: *const u8, _: *mut u8, _: usize) -> i32>,
sign_func: Option<unsafe extern "C" fn(_: *mut c_void, _: Option<unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: usize) -> i32>, _: *mut c_void, _: u32, _: u32, _: *const u8, _: *mut u8) -> i32>,
key_len_func: Option<unsafe extern "C" fn(_: *mut c_void) -> usize>,
) -> i32
Expand description
\brief Initialize an RSA-alt context
\param ctx Context to initialize. It must not have been set up yet (type #MBEDTLS_PK_NONE). \param key RSA key pointer \param decrypt_func Decryption function \param sign_func Signing function \param key_len_func Function returning key length in bytes
\return 0 on success, or MBEDTLS_ERR_PK_BAD_INPUT_DATA if the context wasn’t already initialized as RSA_ALT.
\note This function replaces \c mbedtls_pk_setup() for RSA-alt.