Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add API doc: wc_ecc_set_curve #8173

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions doc/dox_comments/header_files/ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2006,3 +2006,29 @@ int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
\endcode
*/
int wc_ecc_set_nonblock(ecc_key *key, ecc_nb_ctx_t* ctx);

/*!
\ingroup ECC

\brief Compare a curve which has larger key than specified size or the curve matched curve ID,
set a curve with smaller key size to the key.

\return 0 Returned upon successfully setting the key

\param keysize Key size in bytes
\param curve_id Curve ID

_Example_
\code int ret;
ecc_key ecc;

ret = wc_ecc_init(&ecc);
if (ret != 0)
return ret;
ret = wc_ecc_set_curve(&ecc, 32, ECC_SECP256R1));
if (ret != 0)
return ret;

\endcode
*/
int wc_ecc_set_curve(ecc_key *key, int keysize, int curve_id);
Loading