pub unsafe extern "C" fn mbedtls_ecjpake_setup(
    ctx: *mut mbedtls_ecjpake_context,
    role: mbedtls_ecjpake_role,
    hash: mbedtls_md_type_t,
    curve: mbedtls_ecp_group_id,
    secret: *const c_uchar,
    len: usize
) -> c_int
Expand description

\brief Set up an ECJPAKE context for use.

\note Currently the only values for hash/curve allowed by the standard are #MBEDTLS_MD_SHA256/#MBEDTLS_ECP_DP_SECP256R1.

\param ctx The ECJPAKE context to set up. This must be initialized. \param role The role of the caller. This must be either #MBEDTLS_ECJPAKE_CLIENT or #MBEDTLS_ECJPAKE_SERVER. \param hash The identifier of the hash function to use, for example #MBEDTLS_MD_SHA256. \param curve The identifier of the elliptic curve to use, for example #MBEDTLS_ECP_DP_SECP256R1. \param secret The pre-shared secret (passphrase). This must be a readable not empty buffer of length \p len Bytes. It need only be valid for the duration of this call. \param len The length of the pre-shared secret \p secret.

\return \c 0 if successful. \return A negative error code on failure.